Closed jigarpthakkar closed 2 years ago
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:
Hey @jigarpthakkar do you have multiple python installed on your computer? It looks you are hitting some kind of mixed environments issue.
I would strongly encourage you to use a virtual environment with conda or Python virtual env
Hi @fcollonval , Thank you for your prompt response. Sure let me try with Python virtual environment and will update if the issue is resolved.
Best regards, Jigar.
Hi @fcollonval ,
I have used Python virtual env, and now I am able to successfully run
pip install -e .
Thanks to you :).
However, when I ran (note that my venv is active)
jupyter labextension develop . --overwrite
First it gave me
PermissionError: [Errno 13] Permission denied: '/usr/local/share/jupyter'
And when I ran it with sudo
sudo jupyter labextension develop . --overwrite
It gave me following error
(env) [user@host dss_hello_world]$ sudo jupyter labextension develop . --overwrite
Traceback (most recent call last):
File "/home/user/.local/bin/jupyter", line 5, in <module>
from jupyter_core.command import main
ModuleNotFoundError: No module named 'jupyter_core'
Should this jupyter command run from env? Because I see it is being ran from .local/bin? Any tips to resolve this issue?
Thanks.
Hey it needs to be run from the virtual env. Butt this is strange that it takes to write into /usr
. It should be writing into the virtual env.
I'm afak right now but I can copy paste a substitute for that command - it creates a link from your dev folder to the JupyterLab share folder.
No problem, Thank you. Meanwhile, I will try to find a way to make it work.
So you need to run in your virtual environment:
$ jupyter labextension list
JupyterLab v3.2.5
/path/to/venv/share/jupyter/labextensions
jupyterlab-plotly v5.4.0 enabled OK
@jupyter-widgets/jupyterlab-manager v3.0.1 enabled OK (python, jupyterlab_widgets)
The important part to figure out is the share/jupyter/labextensions
folder.
Then if your extension is named jupyterlab-myextension
, instead of running jupyter labextension develop . --overwrite
you can create a symlink between the jupyterlab_myextension/labextension
dev folder and /path/to/venv/share/jupyter/labextensions/jupyterlab-myextension
(the name must be identical to the name mentioned in the package.json
).
Hi @fcollonval , I could address the issue by installing jupyter_core. I also removed and recreated virtual environment. Thank you so much for your help. I appreciate it.
Best regards, Jigar.
Description
I am new to JupyterLab (and AI/ML, Python arena). I want to do some experiments with JupyterLab and intend to develop an extension. I have started with JypterLab installation and running "hello-world" extension on JypterLab.
When I tried to build (pip install -e .) "hello-world" (https://github.com/jupyterlab/extension-examples/tree/master/hello-world) extension generated using cookiecutter, there is an error saying "ModuleNotFoundError: No module named 'jupyterlab'"
It looks like, while compile extension, code tries to access juypterlab package but not able to find it.
I tried to search already opened issues, but could not find if someone has already faced such issue before. So I think I have missed something obvious. Please do advice or point me to a direction. Thank you.
Reproduce
I have followed steps given on "hello-world" example - https://github.com/jupyterlab/extension-examples/tree/master/hello-world
At this build I am facing below error.
Expected behavior
Extension build should be successful
Context
Troubleshoot Output
Command Line Output
Browser Output