# Cannot run Jupyter Notebook (nor JupyterLab) on FreeBSD

**URL:** <https://discourse.jupyter.org/t/cannot-run-jupyter-notebook-nor-jupyterlab-on-freebsd/6050>\
**Category:** discuss\
**Tags:** help-wanted\
**Created:** [September 19, 2020, 4:21pm UTC](https://discourse.jupyter.org/t/cannot-run-jupyter-notebook-nor-jupyterlab-on-freebsd/6050 "2020-09-19T16:21:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leonardorame](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/leonardorame/32/2760_2.png) [@leonardorame](https://discourse.jupyter.org/u/leonardorame)\
**Post date:** [September 19, 2020, 4:21pm UTC](https://discourse.jupyter.org/t/cannot-run-jupyter-notebook-nor-jupyterlab-on-freebsd/6050/1 "2020-09-19T16:21:20Z")

</div>

Hi, after a couple of days of failures I come here for help. I’m trying to install Jupyter Notebook on a FreeBSD 12.1 Jail, but there’s an issue preventing the ipykernel to start.

To install I followed this tutorial: [https://project.altservice.com/issues/923](https://project.altservice.com/issues/923)

I can open the notebook on the browser, but when I do a simple operation, like “1+1” the result never shows and the server console shows this:

```auto
[root@jupyterlab ~]# service jupyter start
[root@jupyterlab ~]# Need to remove all those ^M characters from a DOS file? Try

    tr -d \\r < dosfile > newfile
        -- Originally by Dru <genesis@istar.ca>
[W 07:44:22.156 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 07:44:22.157 NotebookApp] Serving notebooks from local directory: /usr/home/jupyter
[I 07:44:22.157 NotebookApp] Jupyter Notebook 6.1.4 is running at:
[I 07:44:22.158 NotebookApp] http://jupyterlab:8888/
[I 07:44:22.158 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 07:44:29.710 NotebookApp] 302 POST /login?next=%2Ftree%3F (192.168.0.110) 26.92ms
^C
[root@jupyterlab ~]# [I 07:44:56.509 NotebookApp] Creating new notebook in
[I 07:44:56.569 NotebookApp] Writing notebook-signing key to /usr/home/jupyter/.local/share/jupyter/notebook_secret
/usr/local/lib/python3.7/site-packages/jupyter_client/connect.py:164: RuntimeWarning: Failed to set sticky bit on '/usr/home/jupyter/.local/share/jupyter/runtime/kernel-62f2b91b-2285-4250-b316-d9fb4e786415.json': [Errno 79] Inappropriate file type or format: '/usr/home/jupyter/.local/share/jupyter/runtime/kernel-62f2b91b-2285-4250-b316-d9fb4e786415.json'
Probably not a big deal, but runtime files may be cleaned up periodically.
  RuntimeWarning,
[I 07:44:58.331 NotebookApp] Kernel started: 62f2b91b-2285-4250-b316-d9fb4e786415, name: python3
/usr/local/lib/python3.7/site-packages/jupyter_client/connect.py:164: RuntimeWarning: Failed to set sticky bit on '/usr/home/jupyter/.local/share/jupyter/runtime/kernel-62f2b91b-2285-4250-b316-d9fb4e786415.json': [Errno 79] Inappropriate file type or format: '/usr/home/jupyter/.local/share/jupyter/runtime/kernel-62f2b91b-2285-4250-b316-d9fb4e786415.json'
Probably not a big deal, but runtime files may be cleaned up periodically.
  RuntimeWarning,
[W 07:45:19.514 NotebookApp] Replacing stale connection: 62f2b91b-2285-4250-b316-d9fb4e786415:c5d00131b1f547b780b108da491e5a77
[W 07:45:41.442 NotebookApp] Replacing stale connection: 62f2b91b-2285-4250-b316-d9fb4e786415:c5d00131b1f547b780b108da491e5a77
[W 07:45:58.426 NotebookApp] Timeout waiting for kernel_info reply from 62f2b91b-2285-4250-b316-d9fb4e786415

```

Any hint?

---

<div class="post-metadata">

**Author:** ![nomoo](https://avatars.discourse-cdn.com/v4/letter/n/47e85d/32.png) [@nomoo](https://discourse.jupyter.org/u/nomoo)\
**Post date:** [September 22, 2020, 6:00am UTC](https://discourse.jupyter.org/t/cannot-run-jupyter-notebook-nor-jupyterlab-on-freebsd/6050/2 "2020-09-22T06:00:29Z")

</div>

@leonardorame , try to use prebuilt package: [https://www.freshports.org/www/py-notebook/](https://www.freshports.org/www/py-notebook/) , like:  
`pkg install py37-notebook`

It will install all required packages but it doesn’t contain the rc-script for autostart.

---

<div class="post-metadata">

**Author:** ![leonardorame](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/leonardorame/32/2760_2.png) [@leonardorame](https://discourse.jupyter.org/u/leonardorame)\
**Post date:** [September 24, 2020, 2:32am UTC](https://discourse.jupyter.org/t/cannot-run-jupyter-notebook-nor-jupyterlab-on-freebsd/6050/3 "2020-09-24T02:32:19Z")

</div>

Hi @nomoo, I installed `py37-notebook` in a new jail and I’ve got the same result:

```
[W 23:27:01.786 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.

```

[I 23:27:01.788 NotebookApp] Serving notebooks from local directory: /usr/home/jupyter  
[I 23:27:01.788 NotebookApp] The Jupyter Notebook is running at:  
[I 23:27:01.788 NotebookApp] [http://jupyterlab:8888/](http://jupyterlab:8888/)  
[I 23:27:01.788 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).  
[I 23:27:07.233 NotebookApp] 302 POST /login?next=%2Ftree%3F (192.168.0.110) 0.80ms  
[I 23:27:14.154 NotebookApp] Creating new notebook in  
[I 23:27:14.223 NotebookApp] Writing notebook-signing key to /usr/home/jupyter/.local/share/jupyter/notebook\_secret  
[W 23:27:15.742 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20200923232701 (192.168.0.110) 5.05ms referer=http://192.168.0.111:8888/notebooks/Untitled.ipynb?kernel\_name=python3  
/usr/local/lib/python3.7/site-packages/jupyter\_client/connect.py:164: RuntimeWarning: Failed to set sticky bit on ‘/usr/home/jupyter/.local/share/jupyter/runtime/kernel-5b59a211-f886-4aa2-bacb-898ec27ad0d0.json’: [Errno 79] Inappropriate file type or format: ‘/usr/home/jupyter/.local/share/jupyter/runtime/kernel-5b59a211-f886-4aa2-bacb-898ec27ad0d0.json’  
Probably not a big deal, but runtime files may be cleaned up periodically.  
RuntimeWarning,  
[I 23:27:15.890 NotebookApp] Kernel started: 5b59a211-f886-4aa2-bacb-898ec27ad0d0  
/usr/local/lib/python3.7/site-packages/jupyter\_client/connect.py:164: RuntimeWarning: Failed to set sticky bit on ‘/usr/home/jupyter/.local/share/jupyter/runtime/kernel-5b59a211-f886-4aa2-bacb-898ec27ad0d0.json’: [Errno 79] Inappropriate file type or format: ‘/usr/home/jupyter/.local/share/jupyter/runtime/kernel-5b59a211-f886-4aa2-bacb-898ec27ad0d0.json’  
Probably not a big deal, but runtime files may be cleaned up periodically.  
RuntimeWarning,  
[W 23:27:36.931 NotebookApp] Replacing stale connection: 5b59a211-f886-4aa2-bacb-898ec27ad0d0:27e53ba6d487462192b620b2dbf0c99a  
[W 23:27:59.967 NotebookApp] Replacing stale connection: 5b59a211-f886-4aa2-bacb-898ec27ad0d0:27e53ba6d487462192b620b2dbf0c99a  
[W 23:28:15.918 NotebookApp] Timeout waiting for kernel\_info reply from 5b59a211-f886-4aa2-bacb-898ec27ad0d0  
[I 23:28:15.927 NotebookApp] Starting buffering for 5b59a211-f886-4aa2-bacb-898ec27ad0d0:27e53ba6d487462192b620b2dbf0c99a  
[I 23:28:15.928 NotebookApp] Restoring connection for 5b59a211-f886-4aa2-bacb-898ec27ad0d0:27e53ba6d487462192b620b2dbf0c99a
