Closed 7beggars closed 3 years ago
Hi @yaacovNaNachRabbeinu can you specify what versions you are using? This will help determine if you've found a bug or if something is broken about your install
Version Info
import ipycytoscape; print(ipycytoscape.__version__)
) : Hi @ianhi here versions:
Version Info
ipycytoscape version (import ipycytoscape; print(ipycytoscape.__version__)) : 1.1.0
Python version: 3.9
Jupyter(Lab) version: 2.2.6
Thanks!
Argh the proper install instructions still aren't rendering properly on the docs, sorry about that.
Can you try running this command:
jupyter labextension install @jupyter-widgets/jupyterlab-manager
and then restart your jupyterlab and see if that fixes the issue?
Full instructions on jlab usage are here: https://github.com/QuantStack/ipycytoscape#for-jupyterlab-users
Ah yes. That's something we'll need to fix in the documentation as well. You got caught by the transition to JupyterLab 3 which is happening all across the ecosystem right now. Ipycytoscape will support jupyterlab 3 soon, and that will make installation significantly easier. Until then I think the command you need is:
jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
in order to capture the version for jupyterlab 2.x
Edit: I just updated the readme to reflect this https://github.com/QuantStack/ipycytoscape/commit/8c864668d928d0b0ca2694cdb3cc7c9867b24c77
Ah yes. That's something we'll need to fix in the documentation as well. You got caught by the transition to JupyterLab 3 which is happening all across the ecosystem right now. Ipycytoscape will support jupyterlab 3 soon, and that will make installation significantly easier. Until then I think the command you need is:
jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
in order to capture the version for jupyterlab 2.x
Edit: I just updated the readme to reflect this 8c86466
When doing jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
I get the following error message:
(base) #jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
An error occured.
ValueError: Please install nodejs >=10.0.0 before continuing. nodejs may be installed using conda or directly from the nodejs website.
See the log file for details: /tmp/jupyterlab-debug-6hy6k7wf.log
(base) #
Are you using a nodejs>=10?
You can check it with conda list | grep node
if you're using conda.
conda list | grep node
(base) #conda list | grep node nodejs 6.13.1 0 conda-forge
but when I do `node -v `in my shell terminal:
v14.15.3
P.S.: i found a similar problem but i use arch linux https://stackoverflow.com/questions/61888748/extension-installation-error-please-install-nodejs-5-and-npm-before-continuing
I managed to installjupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
, I tried several solutions to update nodejs
via conda
and after a while of trying it was successful, but now the following message appears as in the figure below:
Are you using a nodejs>=10? You can check it with
conda list | grep node
if you're using conda.
I already did several ways to update but the output to conda list | grep node
remains:
nodejs 0.1.1 pypi_0 pypi
@yaacovNaNachRabbeinu what is the output of jupyter labextension list
also, have you tried restarted jupyterlab and then re-running all the cells?
Sometimes conda
can get kind of stuck, I'd recommend just creating a new environment. Here's a stripped down version that should work (it also uses mamba which is like conda but faster :))
conda create -n cytoscape -c conda-forge -c anaconda python=3 mamba
conda activate cytoscape
mamba install -c conda-forge nodejs ipycytoscape jupyterlab
jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
Also it's worth mentioning that we will be releasing jlab3 support soon which happily will not require all this mucking around with nodejs and build steps
jupyter labextension list
I restarted jupyterlab before running the cells. There is an example where loading widgets
appears, but it never leaves this message, see the photo below:
@yaacovNaNachRabbeinu what is the output of
jupyter labextension list
also, have you tried restarted jupyterlab and then re-running all the cells?Sometimes
conda
can get kind of stuck, I'd recommend just creating a new environment. Here's a stripped down version that should work (it also uses mamba which is like conda but faster :))conda create -n cytoscape -c conda-forge -c anaconda python=3 mamba conda activate cytoscape mamba install -c conda-forge nodejs ipycytoscape jupyterlab jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
I will try these guidelines
jupyter labextension list
my output to jupyter labextension list
bellow:
(base) #jupyter labextension list
Fail to get yarn configuration.
Fail to get yarn configuration.
JupyterLab v2.2.6
Known labextensions:
app dir: /opt/anaconda/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager v2.0.0 enabled OK
(base) #
@yaacovNaNachRabbeinu what is the output of
jupyter labextension list
also, have you tried restarted jupyterlab and then re-running all the cells?Sometimes
conda
can get kind of stuck, I'd recommend just creating a new environment. Here's a stripped down version that should work (it also uses mamba which is like conda but faster :))conda create -n cytoscape -c conda-forge -c anaconda python=3 mamba conda activate cytoscape mamba install -c conda-forge nodejs ipycytoscape jupyterlab jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
when executing the above commands I got a conflict error:
Preparing transaction: done
Verifying transaction: done
Executing transaction: - Enabling notebook extension jupyter-js-widgets/extension...
- Validating: OK
done
An error occured.
ValueError:
"@jupyter-widgets/jupyterlab-manager@2.0.0" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab Extension Package
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/application
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/logconsole
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/mainmenu
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/notebook
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/rendermime
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/rendermime-interfaces
>=6.0.0 <6.1.0 >=5.0.0 <6.0.0 @jupyterlab/services
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/settingregistry
See the log file for details: /tmp/jupyterlab-debug-cf9sw_qu.log
(cytoscape) #
here content from log:
Node v15.3.0
Yarn configuration loaded.
> /home/me/.conda/envs/cytoscape/bin/npm pack @jupyter-widgets/jupyterlab-manager@2.0
npm notice
npm notice 📦 @jupyter-widgets/jupyterlab-manager@2.0.0
npm notice === Tarball Contents ===
npm notice 1.5kB LICENSE
npm notice 2.1kB README.md
npm notice 277B lib/index.d.ts
npm notice 380B lib/index.js
npm notice 6.0kB lib/manager.d.ts
npm notice 15.3kB lib/manager.js
npm notice 1.9kB lib/output.d.ts
npm notice 5.3kB lib/output.js
npm notice 828B lib/plugin.d.ts
npm notice 7.8kB lib/plugin.js
npm notice 960B lib/renderer.d.ts
npm notice 3.3kB lib/renderer.js
npm notice 216B lib/semvercache.d.ts
npm notice 862B lib/semvercache.js
npm notice 2.3kB package.json
npm notice 375B schema/plugin.json
npm notice === Tarball Details ===
npm notice name: @jupyter-widgets/jupyterlab-manager
npm notice version: 2.0.0
npm notice filename: @jupyter-widgets/jupyterlab-manager-2.0.0.tgz
npm notice package size: 13.3 kB
npm notice unpacked size: 49.4 kB
npm notice shasum: 05ab402833df07aac1ec2c549a1d748b3c303185
npm notice integrity: sha512-i+qtbEe//W9Ru[...]Fu0KbkxM9aQXQ==
npm notice total files: 16
npm notice
jupyter-widgets-jupyterlab-manager-2.0.0.tgz
Traceback (most recent call last):
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
yield
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab/labextensions.py", line 127, in start
ans = self.run_task()
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab/labextensions.py", line 166, in run_task
return any([
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab/labextensions.py", line 167, in <listcomp>
install_extension(
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab/commands.py", line 392, in install_extension
return handler.install_extension(extension, pin=pin)
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab/commands.py", line 614, in install_extension
info = self._install_extension(extension, tempdir, pin=pin)
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab/commands.py", line 1677, in _install_extension
raise ValueError(msg)
ValueError:
"@jupyter-widgets/jupyterlab-manager@2.0.0" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab Extension Package
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/application
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/logconsole
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/mainmenu
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/notebook
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/rendermime
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/rendermime-interfaces
>=6.0.0 <6.1.0 >=5.0.0 <6.0.0 @jupyterlab/services
>=3.0.0 <3.1.0 >=2.0.0 <3.0.0 @jupyterlab/settingregistry
Exiting application: lab
oops sorry. Need o specify jlab =2.
conda create -n cytoscape -c conda-forge -c anaconda python=3 mamba
conda activate cytoscape
mamba install -c conda-forge nodejs ipycytoscape jupyterlab=2
jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
I'm working on releasing jlab3 support right now, so hopefully that will be the miracle cure :)
oops sorry. Need o specify jlab =2.
conda create -n cytoscape -c conda-forge -c anaconda python=3 mamba conda activate cytoscape mamba install -c conda-forge nodejs ipycytoscape jupyterlab=2 jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
I'm working on releasing jlab3 support right now, so hopefully that will be the miracle cure :)
Now it worked! I haven't finished testing all the examples in the repository, for now, and only one of the examples I tested didn't render, but I'll look at what happened and post if necessary ... But most of the examples in the repository that I've tested so far don't gave no error and rendered perfectly.
Thank you very much!, ThankxXD!! Thanks for your patience.
One of the examples that rendered in the figure below:
EDIT UPDATE: give me a day to do tests and definitely take this issue as resolved. Although most errors are due to ignorance of the compatibility dynamics of each component of the repository.
conda create -n cytoscape -c conda-forge -c anaconda python=3 mamba conda activate cytoscape mamba install -c conda-forge nodejs ipycytoscape jupyterlab=2 jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
I turned off the PC and when I turned it on again I immediately opened the conda
and did a jupyter lab
inside the conda shell and now the error model not found
ou loading widgets
(but never carries) appears again. Apparently the changes did not remain, what should I do so that the changes persist?
Hey thanks for posting clear steps of how to reproduce @yaacovNaNachRabbeinu. I'm gonna have a look right now.
Hi @yaacovNaNachRabbeinu I've repeated your steps and can't reproduce this error.
The only difference is that I didn't specify -c Ananconda
as a channel. Maybe it's pulling some packages out of anaconda that don't interact well with the conda forge ones?
Really can't think of anything else.
Please try again but this time specifying only the -c conda-forge
command.
To clarify: Is that error only there when you open the notebook, but then goes away once you run the cells again? Or is the error also present when you re-run the cells?
To clarify: Is that error only there when you open the notebook, but then goes away once you run the cells again? Or is the error also present when you re-run the cells?
I'm sorry, I use a 'notebook computer', I forgot to make this clear, replace it now with the word 'PC'. About your doubts: regardless of restarting jupyter lab or not, the error persists in the execution of the cells at all times;
Hi @yaacovNaNachRabbeinu I've repeated your steps and can't reproduce this error. The only difference is that I didn't specify
-c Ananconda
as a channel. Maybe it's pulling some packages out of anaconda that don't interact well with the conda forge ones? Really can't think of anything else. Please try again but this time specifying only the-c conda-forge
command.
I will redo the execution, although I have tried to correct this by running the commands below again before seeing your request for clarification, follow the complete execution of the commands below, but I imagine I should have activated the environment by doing conda activate
, maybe that's it, I will check:
#source /opt/anaconda/bin/activate root
(base) #conda create -n cytoscape -c conda-forge -c anaconda python=3 mamba
conda activate cytoscape
mamba install -c conda-forge nodejs ipycytoscape jupyterlab=2
jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
WARNING: A directory already exists at the target location '/home/me/.conda/envs/cytoscape'
but it is not a conda environment.
Continue creating environment (y/[n])? n
CondaSystemExit: Exiting.
^CTraceback (most recent call last):
File "/home/me/.conda/envs/cytoscape/bin/mamba", line 7, in <module>
from mamba.mamba import main
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/mamba/mamba.py", line 52, in <module>
import mamba.mamba_api as api
ImportError: KeyboardInterrupt:
^CTraceback (most recent call last):
File "/home/me/.conda/envs/cytoscape/bin/jupyter-labextension", line 6, in <module>
from jupyterlab.labextensions import main
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab/labextensions.py", line 16, in <module>
from .commands import (
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab/commands.py", line 29, in <module>
from jupyterlab_server.process import which, Process, WatchHelper, list2cmdline
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab_server/__init__.py", line 4, in <module>
from .app import LabServerApp
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab_server/app.py", line 9, in <module>
from .server import ServerApp
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab_server/server.py", line 20, in <module>
from notebook.notebookapp import aliases, flags, NotebookApp as ServerApp
File "/home/me/.local/lib/python3.9/site-packages/notebook/notebookapp.py", line 49, in <module>
from zmq.eventloop import ioloop
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/zmq/eventloop/__init__.py", line 3, in <module>
from zmq.eventloop.ioloop import IOLoop
File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/zmq/eventloop/ioloop.py", line 78, in <module>
while _IOLoop.configurable_default() is not _IOLoop:
File "/home/me/.local/lib/python3.9/site-packages/tornado/ioloop.py", line 326, in configurable_default
from tornado.platform.asyncio import AsyncIOLoop
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 786, in exec_module
File "<frozen importlib._bootstrap_external>", line 881, in get_code
File "<frozen importlib._bootstrap_external>", line 980, in get_data
KeyboardInterrupt
(cytoscape) #conda create -n cytoscape -c conda-forge -c anaconda python=3 mamba
conda activate cytoscape
mamba install -c conda-forge nodejs ipycytoscape jupyterlab=2
jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0
WARNING: A directory already exists at the target location '/home/me/.conda/envs/cytoscape'
but it is not a conda environment.
Continue creating environment (y/[n])? y
CondaValueError: prefix already exists: /home/me/.conda/envs/cytoscape
__ __ __ __
/ \ / \ / \ / \
/ \/ \/ \/ \
███████████████/ /██/ /██/ /██/ /████████████████████████
/ / \ / \ / \ / \ \____
/ / \_/ \_/ \_/ \ o \__,
/ _/ \_____/ `
|/
███╗ ███╗ █████╗ ███╗ ███╗██████╗ █████╗
████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗
██╔████╔██║███████║██╔████╔██║██████╔╝███████║
██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║
██║ ╚═╝ ██║██║ ██║██║ ╚═╝ ██║██████╔╝██║ ██║
╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝
mamba (0.7.6) supported by @QuantStack
GitHub: https://github.com/mamba-org/mamba
Twitter: https://twitter.com/QuantStack
█████████████████████████████████████████████████████████████
NoBaseEnvironmentError: This conda installation has no default base environment. Use
'conda create' to create new environments and 'conda activate' to
activate environments.
Building jupyterlab assets (build:prod:minimize)
(cytoscape) #
Hm, I'm a bit confused by your log but it seems like you're copy/pasting all lines at once? Run them line by line instead.
Also, I recommend changing the name of the environment, because there's already an environment called cytoscape
.
Hi @yaacovNaNachRabbeinu I've repeated your steps and can't reproduce this error. The only difference is that I didn't specify
-c Ananconda
as a channel. Maybe it's pulling some packages out of anaconda that don't interact well with the conda forge ones? Really can't think of anything else. Please try again but this time specifying only the-c conda-forge
command.I will redo the execution, although I have tried to correct this by running the commands below again before seeing your request for clarification, follow the complete execution of the commands below, but I imagine I should have activated the environment by doing
conda activate
, maybe that's it, I will check:#source /opt/anaconda/bin/activate root (base) #conda create -n cytoscape -c conda-forge -c anaconda python=3 mamba conda activate cytoscape mamba install -c conda-forge nodejs ipycytoscape jupyterlab=2 jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0 WARNING: A directory already exists at the target location '/home/me/.conda/envs/cytoscape' but it is not a conda environment. Continue creating environment (y/[n])? n CondaSystemExit: Exiting. ^CTraceback (most recent call last): File "/home/me/.conda/envs/cytoscape/bin/mamba", line 7, in <module> from mamba.mamba import main File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/mamba/mamba.py", line 52, in <module> import mamba.mamba_api as api ImportError: KeyboardInterrupt: ^CTraceback (most recent call last): File "/home/me/.conda/envs/cytoscape/bin/jupyter-labextension", line 6, in <module> from jupyterlab.labextensions import main File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab/labextensions.py", line 16, in <module> from .commands import ( File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab/commands.py", line 29, in <module> from jupyterlab_server.process import which, Process, WatchHelper, list2cmdline File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab_server/__init__.py", line 4, in <module> from .app import LabServerApp File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab_server/app.py", line 9, in <module> from .server import ServerApp File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/jupyterlab_server/server.py", line 20, in <module> from notebook.notebookapp import aliases, flags, NotebookApp as ServerApp File "/home/me/.local/lib/python3.9/site-packages/notebook/notebookapp.py", line 49, in <module> from zmq.eventloop import ioloop File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/zmq/eventloop/__init__.py", line 3, in <module> from zmq.eventloop.ioloop import IOLoop File "/home/me/.conda/envs/cytoscape/lib/python3.9/site-packages/zmq/eventloop/ioloop.py", line 78, in <module> while _IOLoop.configurable_default() is not _IOLoop: File "/home/me/.local/lib/python3.9/site-packages/tornado/ioloop.py", line 326, in configurable_default from tornado.platform.asyncio import AsyncIOLoop File "<frozen importlib._bootstrap>", line 1007, in _find_and_load File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 680, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 786, in exec_module File "<frozen importlib._bootstrap_external>", line 881, in get_code File "<frozen importlib._bootstrap_external>", line 980, in get_data KeyboardInterrupt (cytoscape) #conda create -n cytoscape -c conda-forge -c anaconda python=3 mamba conda activate cytoscape mamba install -c conda-forge nodejs ipycytoscape jupyterlab=2 jupyter labextension install @jupyter-widgets/jupyterlab-manager@2.0 WARNING: A directory already exists at the target location '/home/me/.conda/envs/cytoscape' but it is not a conda environment. Continue creating environment (y/[n])? y CondaValueError: prefix already exists: /home/me/.conda/envs/cytoscape __ __ __ __ / \ / \ / \ / \ / \/ \/ \/ \ ███████████████/ /██/ /██/ /██/ /████████████████████████ / / \ / \ / \ / \ \____ / / \_/ \_/ \_/ \ o \__, / _/ \_____/ ` |/ ███╗ ███╗ █████╗ ███╗ ███╗██████╗ █████╗ ████╗ ████║██╔══██╗████╗ ████║██╔══██╗██╔══██╗ ██╔████╔██║███████║██╔████╔██║██████╔╝███████║ ██║╚██╔╝██║██╔══██║██║╚██╔╝██║██╔══██╗██╔══██║ ██║ ╚═╝ ██║██║ ██║██║ ╚═╝ ██║██████╔╝██║ ██║ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝ mamba (0.7.6) supported by @QuantStack GitHub: https://github.com/mamba-org/mamba Twitter: https://twitter.com/QuantStack █████████████████████████████████████████████████████████████ NoBaseEnvironmentError: This conda installation has no default base environment. Use 'conda create' to create new environments and 'conda activate' to activate environments. Building jupyterlab assets (build:prod:minimize) (cytoscape) #
I ran jupyter lab
and the error continues, I will try to activate the conda environment before running jupyter lab
:
Hm, I'm a bit confused by your log but it seems like you're copy/pasting all lines at once? Run them line by line instead. Also, I recommend changing the name of the environment, because there's already an environment called
cytoscape
.
I'll do as I said, but yes, I'm running one line at a time of code.
Hi @yaacovNaNachRabbeinu I've repeated your steps and can't reproduce this error. The only difference is that I didn't specify
-c Ananconda
as a channel. Maybe it's pulling some packages out of anaconda that don't interact well with the conda forge ones? Really can't think of anything else. Please try again but this time specifying only the-c conda-forge
command.
Now it worked, the point is that I didn't really do conda activate cytoscape
. Although I also think to follow your advice and avoid using -c anaconda
. Thank you very much, I am closing the issue as resolved, if you allow me. @marimeireles and @ianhi you were amazing! Thank*^2xD!
No problem, glad you found your way =) It's a lot of little things to keep track of.
Hi,
I'm running the file
HTML interaction with graph.ipynb
inside jupyter lab but my exit from the linecytoscapeobj
it is as below in the figure. What am I doing wrong?