OS: Arch linux(termux proot)
Python version: 3.10.8
My error message as follow
Visual Studio Code (1.73.1, undefined, desktop)
Jupyter Extension Version: 2022.9.1303220346.
Python Extension Version: 2022.18.2.
Workspace folder /home/jack/Documents/Medical-segmentation
info 15:00:11.430: ZMQ install verified.
User belongs to experiment group 'jupyterTestcf'
User belongs to experiment group 'jupyterEnhancedDataViewer'
info 15:00:12.217: LSP Notebooks experiment is disabled -- not in treatment group
info 15:00:13.731: Got empty env vars with python /bin/python in 1275ms
info 15:00:13.731: Got env vars ourselves faster /bin/python with env var count 59 in 1276ms
info 15:00:13.768: Process Execution: > /bin/python -m pip list
> /bin/python -m pip list
info 15:00:22.102: Starting interactive window for resource '/home/jack/Documents/Medical-segmentation/snakes/example2.py'
info 15:00:22.512: Preferred Remote kernel for Interactive-1.interactive is undefined
info 15:00:25.004: Process Execution: > /bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/pythonFiles/normalizeSelection.py
> /bin/python ~/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/pythonFiles/normalizeSelection.py
info 15:00:25.022: Starting Jupyter Session startUsingPythonInterpreter, .jvsc74a57bd0e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a./bin/python./bin/python.-m#ipykernel_launcher (Python Path: , EnvType: Global, EnvName: '', Version: 3.10.8) for 'Interactive-1.interactive' (disableUI=false)
info 15:00:25.024: Computing working directory for resource '/home/jack/Documents/Medical-segmentation/snakes/example2.py'
info 15:00:25.054: Got env vars ourselves faster /bin/python with env var count 59 in 2ms
info 15:00:25.108: Process Execution: > /bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
> /bin/python -c "import ipykernel; print(ipykernel.__version__); print("5dc3a68c-e34e-4080-9c3e-2a532b2ccb4d"); print(ipykernel.__file__)"
info 15:00:25.266: Got env vars ourselves faster /bin/python with env var count 59 in 14ms
info 15:00:25.266: Got env vars ourselves faster /bin/python with env var count 59 in 6ms
info 15:00:25.308: Process Execution: > /bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"a946baa0-e0d4-41d4-b72d-1eed7330e6f9" --shell=9002 --transport="tcp" --iopub=9004 --f=/home/jack/.local/share/jupyter/runtime/kernel-v2-32230pKMrdOglR18w.json
> /bin/python -m ipykernel_launcher --ip=127.0.0.1 --stdin=9003 --control=9001 --hb=9000 --Session.signature_scheme="hmac-sha256" --Session.key=b"a946baa0-e0d4-41d4-b72d-1eed7330e6f9" --shell=9002 --transport="tcp" --iopub=9004 --f=/home/jack/.local/share/jupyter/runtime/kernel-v2-32230pKMrdOglR18w.json
info 15:00:25.308: Process Execution: cwd: ~/Documents/Medical-segmentation/snakes
cwd: ~/Documents/Medical-segmentation/snakes
info 15:00:25.823: Registering dummy command feature
info 15:00:27.946: ipykernel version & path 6.18.0, /usr/lib/python3.10/site-packages/ipykernel/__init__.py for /bin/python
info 15:00:29.175: Got empty env vars with python /bin/python in 4123ms
info 15:00:29.176: Got empty env vars with python /bin/python in 3924ms
info 15:00:29.176: Got empty env vars with python /bin/python in 3916ms
warn 15:00:33.920: StdErr from Kernel Process /usr/lib/python3.10/site-packages/traitlets/traitlets.py:2412: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
warn 15:00:33.921: StdErr from Kernel Process /usr/lib/python3.10/site-packages/traitlets/traitlets.py:2366: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'a946baa0-e0d4-41d4-b72d-1eed7330e6f9' instead of 'b"a946baa0-e0d4-41d4-b72d-1eed7330e6f9"'.
warn(
warn 15:00:33.964: StdErr from Kernel Process Permission denied (src/ip_resolver.cpp:542)
error 15:00:33.979: Disposing kernel process due to an error o [Error]: The kernel died. Error: /usr/lib/python3.10/site-packages/traitlets/traitlets.py:2412: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use 'hmac-sha256' instead of '"hmac-sha256"' if you require traitlets >=5.
warn(
/usr/lib/python3.10/site-packages/traitlets/traitlets.py:2366: FutureWarning: Supporting extra quotes around Bytes is deprecated in traitlets 5.0. Use 'a946baa0-e0d4-41d4-b72d-1eed7330e6f9' instead of 'b"a946baa0-e0d4-41d4-b72d-1eed7330e6f9"'.
warn(
Permission denied (src/ip_resolver.cpp:542)... View Jupyter [log](command:jupyter.viewOutput) for further details.
at ChildProcess.<anonymous> (/home/jack/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/out/extension.node.js:2:2195101)
at ChildProcess.emit (node:events:538:35)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
category: 'kerneldied',
kernelConnectionMetadata: {
kind: 'startUsingPythonInterpreter',
kernelSpec: {
specFile: '/home/jack/.vscode/extensions/ms-toolsai.jupyter-2022.9.1303220346/temp/jupyter/kernels/python3108jvsc74a57bd0e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a/kernel.json',
interpreterPath: '/bin/python',
isRegisteredByVSC: 'registeredByNewVersionOfExt',
name: 'python3108jvsc74a57bd0e7370f93d1d0cde622a1f8e1c04877d8463912d04d973331ad4851f04de6915a',
argv: [Array],
language: 'python',
executable: 'python',
display_name: 'Python 3.10.8 64-bit',
metadata: [Object],
env: {}
},
I encounter this error message but I does not have any issue in another termux proot system. I remove all python and packages and reinstall. It didn't work for me.
11/24 updated:
It's weird because I look to another system by using pip list. It's the same version with I currently use system.
Package Version
---------------------- -----------
aiohttp 3.8.3
aiohttp-socks 0.7.1
aiorpcX 0.22.1
aiosignal 1.2.0
anyio 3.6.2
appdirs 1.4.4
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asttokens 2.1.0
async-generator 1.10
async-timeout 4.0.2
attrs 22.1.0
autocommand 2.2.2
Babel 2.11.0
backcall 0.2.0
beautifulsoup4 4.11.1
bitstring 3.1.9
black 22.10.0
bleach 5.0.1
build 0.9.0
certifi 2022.9.24
cffi 1.15.1
chardet 5.0.0
charset-normalizer 3.0.0
click 8.1.3
codespell 0.0.0
comm 0.1.0
commonmark 0.9.1
contourpy 1.0.6
cryptography 38.0.1
cycler 0.11.0
Cython 0.29.32
debugpy 1.6.3
decorator 5.1.1
defusedxml 0.7.1
deprecation 2.1.0
dnspython 2.2.1
docopt 0.6.2
docutils 0.19
ecdsa 0.18.0
Electrum 4.3.1
entrypoints 0.4
executing 1.2.0
fastjsonschema 2.16.2
flake8 5.0.4
flake8-black 0.3.3
flake8-isort 5.0.0
fonttools 4.38.0
frozenlist 1.3.1
future 0.18.2
greenlet 1.1.3.post0
idna 3.4
imageio 2.22.4
imutils 0.5.4
inflect 6.0.2
installer 0.5.1
ipykernel 6.18.0
ipython 8.6.0
ipython-genutils 0.2.0
isort 5.10.1
jaraco.context 4.1.2
jaraco.functools 3.5.2
jaraco.text 3.11.0
jedi 0.18.1
Jinja2 3.1.2
json5 0.9.10
jsonrpclib-pelix 0.4.3.2
jsonschema 4.17.1
jupyter_client 7.4.7
jupyter_core 5.0.0
jupyter_packaging 0.12.3
jupyter-server 1.23.3
jupyterlab 3.5.0
jupyterlab-pygments 0.2.2
jupyterlab_server 2.16.3
kiwisolver 1.4.4
lxml 4.9.1
mackup 0.8.36
markdown-it-py 2.1.0
MarkupSafe 2.1.1
matplotlib 3.6.2
matplotlib-inline 0.1.6
mccabe 0.7.0
mdurl 0.1.2
mistune 2.0.4
more-itertools 9.0.0
msgpack 1.0.4
multidict 6.0.2
mypy-extensions 0.4.3
mysql-connector-python 8.0.31
nbclassic 0.4.8
nbclient 0.7.0
nbconvert 7.2.5
nbformat 5.7.0
nest-asyncio 1.5.6
networkx 2.8.8
nibabel 4.0.2
notebook 6.5.2
notebook_shim 0.2.2
numpy 1.23.4
ordered-set 4.1.0
packaging 21.3
pandas 1.5.1
pandocfilters 1.5.0
parso 0.8.3
pathspec 0.10.1
pbkdf2 1.3
pep517 0.13.0
pexpect 4.8.0
pickleshare 0.7.5
pikaur 1.13
Pillow 9.3.0
pip 22.3
platformdirs 2.5.2
pluggy 1.0.0
ply 3.11
portalocker 2.6.0
progressbar2 4.2.0
prometheus-client 0.15.0
prompt-toolkit 3.0.33
protobuf 4.21.7
psutil 5.9.4
ptyprocess 0.7.0
pure-eval 0.2.2
pyaes 1.6.1
pyalpm 0.10.6
pycodestyle 2.9.1
pycparser 2.21
pycryptodomex 3.12.0
pydantic 1.10.2
pyflakes 2.5.0
Pygments 2.13.0
pynvim 0.4.3
pyparsing 3.0.9
PyQt5 5.15.7
PyQt5-sip 12.11.0
pyrsistent 0.19.2
PySocks 1.7.1
python-dateutil 2.8.2
python-dotenv 0.21.0
python-lsp-jsonrpc 1.0.0
python-lsp-server 1.5.0
python-socks 2.0.3
python-utils 3.4.5
pytz 2022.5
pytz-deprecation-shim 0.1.0.post0
PyWavelets 1.4.1
pyzmq 24.0.1
qrcode 7.3.1
regex 2022.10.31
requests 2.28.1
requests-unixsocket 0.3.0
ruamel.yaml 0.17.21
ruamel.yaml.clib 0.2.7
scikit-image 0.19.3
scipy 1.9.3
Send2Trash 1.8.0
setuptools 63.2.0
Shapely 1.8.2
six 1.16.0
sniffio 1.3.0
soupsieve 2.3.2.post1
SQLAlchemy 1.4.43
stack-data 0.6.1
TBB 0.2
terminado 0.17.0
testpath 0.6.0
tifffile 2022.10.10
tinycss2 1.2.1
toml 0.10.2
tomli 2.0.1
tomlkit 0.11.6
tornado 6.2
traitlets 5.5.0
trove-classifiers 2022.10.19
typing_extensions 4.4.0
tzdata 2022.6
tzlocal 4.2
uc-micro-py 1.0.1
ujson 5.5.0
urllib3 1.26.12
validate-pyproject 0.10.1
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.4.1
wheel 0.37.1
yarl 1.8.1
Open your vscode and reinstall the Python and Jupyter Notebook extensions.
Reinstall ipykernel package in the terminal.
At the same time, this issue also proposes other solutions.
Added:
I encountered the same problem with traitlets==4.3.3. I updated it by using pip install traitlets and it's version is 5.5.0 to solve this problem.
I didn't find a way to fix this within Arch itself, but I believe it has something to do with how Arch saves sockets to systemd, which is not accessible in proot, thus the permission denied error. However, as termux can run ipykernel successfully, and you have access to termux directories in proot arch, you can simply do this:
create venv in termux home: python -m venv env-name
activate venv in termux: source ~/env-name/bin/activate
install ipykernel: pip install ipykernel
activate venv in arch: source /data/data/com.termux/files/home/env-name/bin/activate
add venv as kernel: python -m ipykernel install --user --name env-name
select kernel in vscode
Related
What I'm trying to do
I'm writing a Python (version==3.8.X) script for interactive visualization of molecules, which is working perfectly fine in VS Code but not in classical Jupyter Notebooks anymore (it did though just 2 weeks ago). For its practical use case with my employer it needs to be able to be run in Jupyter Notebook but it seems impossible for me to set Jupyter up the correct way on my personal machine (Arch Linux) as well as work stations at work (Ubuntu Linux) even though I've had both running fine lately.
Information I've collected
These are two screenshots of the outputs of the exact same cell (same file), when using Jupyter Notebook and here in VS Code.
Output of jupyter nbextension list:
Known nbextensions:
config dir: /home/lnrd/.jupyter/nbconfig
notebook section
nbextensions_configurator/config_menu/main enabled
- Validating: problems found:
- require? X nbextensions_configurator/config_menu/main
contrib_nbextensions_help_item/main enabled
- Validating: OK
jupyter-js-widgets/extension enabled
- Validating: OK
jupyterlab disabled
tree section
nbextensions_configurator/tree_tab/main enabled
- Validating: problems found:
- require? X nbextensions_configurator/tree_tab/main
config dir: /home/lnrd/.local/etc/jupyter/nbconfig
notebook section
ipyevents/extension enabled
- Validating: OK
nbextensions_configurator/config_menu/main enabled
- Validating: problems found:
- require? X nbextensions_configurator/config_menu/main
jupyter-js-widgets/extension enabled
- Validating: OK
tree section
nbextensions_configurator/tree_tab/main enabled
- Validating: problems found:
- require? X nbextensions_configurator/tree_tab/main
config dir: /etc/jupyter/nbconfig
notebook section
jupyter-js-widgets/extension enabled
- Validating: OK
Output of jupyter troubleshoot. I'm unsure about the meaning of the sys.<var> paths and where those are configured. I do understand $PATH, how it's configured and what it means for software in my OS. I guess pip list here is equal to py310 -m pip list.
I'm guessing the sys.<var> references the python kernel which Jupyter is running
I unsuccessfully tried setting up and using my py38 install as kernel (sys.version within the notebook then gave me 3.8.X) but errors had been the same
even with py38 as kernel, jupyter notebook --debug output (see below) had been looking for files in py310 directories. Maybe I've just made a mistake setting up the py38 kernel correctly but maybe not.
when using jupyter nbextension enable sometimes I've used the --py and --user flags and sometimes didn't - could this have been an issue?
$PATH:
/home/lnrd/bin
/usr/local/sbin
/usr/local/bin
/usr/sbin
/usr/bin
/sbin
/bin
/usr/games
/usr/local/games
/usr/bin/site_perl
/usr/bin/vendor_perl
/usr/bin/core_perl
/home/lnrd/.local/bin
sys.path:
/usr/bin
/usr/lib/python310.zip
/usr/lib/python3.10
/usr/lib/python3.10/lib-dynload
/home/lnrd/.local/lib/python3.10/site-packages
/usr/lib/python3.10/site-packages
sys.executable:
/usr/bin/python
sys.version:
3.10.9 (main, Dec 19 2022, 17:35:49) [GCC 12.2.0]
platform.platform():
Linux-6.1.8-arch1-1-x86_64-with-glibc2.36
which -a jupyter:
/usr/sbin/jupyter
/usr/bin/jupyter
/sbin/jupyter
/bin/jupyter
/home/lnrd/.local/bin/jupyter
pip list:
Package Version
--------------------------------- -----------
aiohttp 3.7.4.post0
aiohttp-retry 2.8.3
alabaster 0.7.13
amqp 5.1.1
antlr4-python3-runtime 4.9.3
anyio 3.6.2
anytree 2.8.0
appdirs 1.4.4
apptools 5.2.0
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
arrow 1.2.3
ase 3.22.1
astroid 2.13.3
asttokens 2.2.1
async-generator 1.10
async-timeout 3.0.1
asyncssh 2.12.0
atpublic 3.1.1
attrs 22.2.0
autocommand 2.2.2
autopep8 1.6.0
Babel 2.11.0
backcall 0.2.0
beautifulsoup4 4.11.1
billiard 3.6.4.0
bleach 6.0.0
breezy 3.3.2
Brlapi 0.8.4
btrfsutil 6.1.3
CacheControl 0.12.11
celery 5.2.7
certifi 2022.12.7
cffi 1.15.1
chardet 4.0.0
click 8.1.3
click-didyoumean 0.3.0
click-plugins 1.1.1
click-repl 0.2.0
colorama 0.4.6
comm 0.1.2
commonmark 0.9.1
configobj 5.1.0.dev0
contextlib2 21.6.0
cryptography 39.0.0
cssselect 1.2.0
cycler 0.11.0
Cython 0.29.33
debugpy 1.6.6
decorator 5.1.1
defusedxml 0.7.1
deprecation 2.1.0
dictdiffer 0.9.0
dill 0.3.6
discord 1.7.3
discord.py 1.7.3
diskcache 5.4.0
distlib 0.3.6
distro 1.8.0
dnspython 2.2.1
docutils 0.19
dpath 2.0.6
dscribe 1.2.2
dulwich 0.20.46
dvc-data 0.8.0
dvc-http 2.19.1
dvc-objects 0.2.2
dvc-render 0.0.10
dvc-task 0.1.2
dvclive 0.10.0
entrypoints 0.4
envisage 6.1.0
evdev 1.6.1
executing 1.2.0
fastbencode 0.1
fastjsonschema 2.16.2
flake8 4.0.1
flatten-dict 0.4.2
flufl.lock 7.1.1
fonttools 4.29.1
fqdn 1.5.1
fsspec 2022.8.2
funcy 1.17
future 0.18.2
gitdb 4.0.9
GitPython 3.1.27
grandalf 0.6
greenlet 1.1.2
html5lib 1.1
hydra-core 1.2.0
idna 3.4
imagesize 1.4.1
importlib-metadata 5.0.0
inflect 6.0.2
ipyevents 2.0.1
ipykernel 6.20.2
ipython 8.9.0
ipython-genutils 0.2.0
ipywidgets 8.0.4
isoduration 20.11.0
isort 5.11.4
jaraco.context 4.2.0
jaraco.functools 3.5.2
jaraco.text 3.11.0
jedi 0.18.2
Jinja2 3.1.2
joblib 1.2.0
json5 0.9.12
jsonpointer 2.3
jsonschema 4.17.3
jupyter 1.0.0
jupyter_client 8.0.1
jupyter-console 6.4.4
jupyter-contrib-core 0.4.2
jupyter_core 5.1.5
jupyter-events 0.6.3
jupyter-nbextensions-configurator 0.6.1
jupyter_packaging 0.12.3
jupyter-server 1.23.5
jupyter_server_terminals 0.4.4
jupyterlab 3.5.3
jupyterlab-pygments 0.2.2
jupyterlab_server 2.19.0
jupyterlab-widgets 3.0.5
kiwisolver 1.3.2
kombu 5.2.4
lazy-object-proxy 1.9.0
ledfx 0.10.7
lensfun 0.3.3
libfdt 1.6.1
lit 15.0.7.dev0
llvmlite 0.39.1
louis 3.24.0
lxml 4.9.2
Markdown 3.4.1
markdown-it-py 2.1.0
MarkupSafe 2.1.2
matplotlib 3.5.1
matplotlib-inline 0.1.6
mayavi 4.8.1
mccabe 0.6.1
mdurl 0.1.2
merge3 0.0.12
meson 1.0.0
mistune 2.0.4
more-itertools 9.0.0
msgpack 1.0.4
multidict 6.0.2
mypy 0.942
mypy-extensions 0.4.3
nanotime 0.5.2
natsort 8.1.0
nbclassic 0.5.1
nbclient 0.7.2
nbconvert 7.2.9
nbformat 5.7.3
nest-asyncio 1.5.6
netsnmp-python 1.0a1
networkx 2.8.6
notebook 6.5.2
notebook_shim 0.2.2
nspektr 0.4.0
numba 0.56.4
numpy 1.22.4
omegaconf 2.2.3
ordered-set 4.1.0
packaging 23.0
pandas 1.5.1
pandocfilters 1.5.0
parso 0.8.3
pathspec 0.9.0
patiencediff 0.2.12
pep517 0.13.0
pexpect 4.8.0
pickleshare 0.7.5
Pillow 9.4.0
pip 22.3.1
platformdirs 2.6.2
pluggy 1.0.0
ply 3.11
progress 1.6
prometheus-client 0.16.0
prompt-toolkit 3.0.36
psutil 5.9.4
ptyprocess 0.7.0
pure-eval 0.2.2
pwquality 1.4.5
py3Dmol 1.8.1
PyAudio 0.2.11
pybind11 2.10.1
pycairo 1.23.0
pycodestyle 2.10.0
pycparser 2.21
pydantic 1.10.4
pydocstyle 6.1.1
pydot 1.4.2
pyface 7.4.2
pyflakes 3.0.1
pygit2 1.10.1
Pygments 2.14.0
PyGObject 3.42.2
pygtrie 2.5.0
pylint 2.15.10
pyls-isort 0.2.2
pylsp-mypy 0.5.7
PyNaCl 1.5.0
pynvim 0.4.3
pyOpenSSL 23.0.0
pyparsing 3.0.9
PyQt5 5.15.6
PyQt5-Qt5 5.15.2
PyQt5-sip 12.9.1
PyQt6 6.4.1
PyQt6-sip 13.4.1
pyqtgraph 0.13.1
pyrsistent 0.19.3
python-dateutil 2.8.2
python-dotenv 0.20.0
python-json-logger 2.0.4
python-lsp-jsonrpc 1.0.0
python-lsp-server 1.4.1
python-xlib 0.31
pytz 2022.7
pyxdg 0.28
PyYAML 6.0
pyzmq 25.0.0
qtconsole 5.4.0
QtPy 2.3.0
rdkit 2022.9.3
requests 2.28.1
requests-unixsocket 0.3.0
resolvelib 0.9.0
retrying 1.3.3
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rfc3987 1.3.8
rich 13.3.1
rope 1.0.0
ruamel.yaml 0.17.21
ruamel.yaml.clib 0.2.6
scikit-learn 1.1.3
scipy 1.8.0
scmrepo 0.1.1
Send2Trash 1.8.0
setproctitle 1.3.2
setuptools 65.6.3
shiboken6 6.4.2
shiboken6-generator 6.4.2
shortuuid 1.0.9
shtab 1.5.5
simplejson 3.18.0
six 1.16.0
smmap 5.0.0
sniffio 1.3.0
snowballstemmer 2.2.0
soupsieve 2.3.2.post1
sparse 0.13.0
Sphinx 5.3.0
sphinxcontrib-applehelp 1.0.4
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 2.0.0
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.5
stack-data 0.6.2
tabulate 0.8.10
TBB 0.2
team 1.0
tenacity 8.1.0
terminado 0.17.1
terminator 2.1.2
testpath 0.6.0
threadpoolctl 3.1.0
tinycss2 1.2.1
toml 0.10.2
tomli 2.0.1
tomlkit 0.11.6
tornado 6.2
tqdm 4.64.1
traitlets 5.8.1
traits 6.4.1
traitsui 7.4.2
trove-classifiers 2023.1.20
typing_extensions 4.4.0
uc-micro-py 1.0.1
ujson 5.2.0
uri-template 1.2.0
urllib3 1.26.12
validate 5.1.0.dev0
validate-pyproject 0.12.1
vimiv 0.8.0
vine 5.0.0
voluptuous 0.13.1
vtk 9.2.2
wcwidth 0.2.6
webcolors 1.12
webencodings 0.5.1
websocket-client 1.5.0
wheel 0.38.4
widgetsnbextension 4.0.5
wrapt 1.14.1
wslink 1.9.1
wxPython 4.2.0
yapf 0.32.0
yarl 1.7.2
youtube-dl 2021.12.17
zc.lockfile 2.0
zipp 3.12.0
Output of jupyter notebook --debug shows this one line containing status 404. I suspect this should lead me somewhere but I'm unsure what to do with this information:
[W <time> NotebookApp] 404 GET /static/components/marked/lib/marked.js (127.0.0.1) 34.030000ms referer=http://localhost:8888/tree
What I've tried to fix this
gone through all config files in all jupyter --paths to check if jupyter-js-widgets=true
Used py38 and py310 kernels
with <py> as py38=/usr/bin/python3.8 and py310=/usr/bin/python3.10 i have
<py> -m pip install --upgrade jupyter notebook ipywidgets widgetsnbextension jupyter_contrib_nbextensions jupyter-js-widgets-nbextension
<py> -m pip install --force-reinstall jupyter notebook ipywidgets widgetsnbextension jupyter_contrib_nbextensions jupyter-js-widgets-nbextension
executing jupyter contrib nbextension install
disabling and enabling different jupyter nbextensions
JupyterLab
pip installing JupyterLab, enabling it and executing jupyterlab extension install py3dmol as suggested by error message from screenshot
uninstalling and disabling JupyterLab again because I hadn't used it when the code ran in Jupyter Notebook originally
I'm trying to use Azure-storage-blob with Python importing with
from azure.storage.blob import BlobServiceClient, BlobClient, ContainerClient
and installed in my .venv with pip install azure-storage-blob and required in requirements.txt with azure-storage-blob
This is my pip list of the environment
Package Version
------------------------- ---------
adal 1.2.7
azure-common 1.1.28
azure-core 1.21.1
azure-cosmos 4.2.0
azure-functions 1.8.0
azure-mgmt-datalake-nspkg 3.0.1
azure-mgmt-nspkg 3.0.2
azure-mgmt-scheduler 2.0.0
azure-mgmt-search 2.1.0
azure-mgmt-servicebus 0.5.3
azure-mgmt-servicefabric 0.2.0
azure-mgmt-signalr 0.1.1
azure-mgmt-subscription 0.2.0
azure-mgmt-trafficmanager 0.50.0
azure-mgmt-web 0.35.0
azure-nspkg 3.0.2
azure-storage-blob 12.9.0
azure-storage-common 2.1.0
backcall 0.2.0
certifi 2021.10.8
cffi 1.15.0
charset-normalizer 2.0.9
click 8.0.4
colorama 0.4.4
cryptography 36.0.1
cycler 0.11.0
debugpy 1.5.1
decorator 5.1.0
entrypoints 0.3
fonttools 4.28.5
idna 3.3
ipykernel 6.6.0
ipython 7.30.1
isodate 0.6.1
itsdangerous 2.1.0
jedi 0.18.1
Jinja2 3.0.3
jupyter-client 7.1.0
jupyter-core 4.9.1
msrest 0.6.21
msrestazure 0.6.4
nest-asyncio 1.5.4
numpy 1.21.5
oauthlib 3.2.0
packaging 21.3
pandas 1.3.5
parso 0.8.3
pickleshare 0.7.5
Pillow 8.4.0
pip 22.0.3
prompt-toolkit 3.0.24
pycparser 2.21
pydocumentdb 2.3.5
Pygments 2.11.0
PyJWT 2.3.0
pymongo 4.0.1
pyparsing 3.0.6
python-dateutil 2.8.2
python-dotenv 0.19.2
pytz 2021.3
pywin32 303
pyzmq 22.3.0
requests 2.26.0
requests-oauthlib 1.3.1
But im getting Import "azure.storage.blob" could not be resolved
How can I solve this problem??
UPDATE: It just don't work in my .venv and under lib/site-package/azure there is not "storage" folder
Try either of the following ways to resolve Import "azure.storage.blob" could not be resolved error:
1. If you are using visual studio code, try following command to install azure-storage-blob:
conda install -c anaconda azure conda install -c conda-forge azure-storage-blob
2. Uninstall older version of azure-storage-blob’ and reinstall: pip uninstall azureandpip uninstall azure-storage`
Reinstall at the specific path:
cdd .venv
pip install azure-storage –upgrade
References: Unresolved import 'azure.storage.blob' when trying to use Python library azure-storage-blob , How to import Azure BlobService in python? and Install Azure Python api on linux: importError: No module named storage.blob
Thanks to everyone I solved recreating .venv
Trying to (re)install Jupyter's nbextension via the following steps in terminal
pip install jupyter_contrib_nbextensions
jupyter contrib nbextension install --user
install --user jupyter nbextension enable varInspector/main
Step 1 = runs and i am able to launch notebooks via "jupyter notebook" in terminal just fine.
Step 2 = fails with
usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]
[--paths] [--json] [--debug]
[subcommand]
Jupyter: Interactive Computing
positional arguments:
subcommand the subcommand to launch
optional arguments:
-h, --help show this help message and exit
--version show the versions of core jupyter packages and exit
--config-dir show Jupyter config dir
--data-dir show Jupyter data dir
--runtime-dir show Jupyter runtime dir
--paths show all Jupyter paths. Add --json for machine-readable
format.
--json output paths as machine-readable json
--debug output debug information about paths
Available subcommands: bundlerextension console execute kernel kernelspec
migrate nbconvert nbextension notebook qtconsole run serverextension
troubleshoot trust
Jupyter command `jupyter-contrib` not found.
python version = Python 3.10.2
my list of packages
Package Version
--------------------------------- ---------
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asteval 0.9.26
asttokens 2.0.5
attrs 21.4.0
backcall 0.2.0
black 22.1.0
bleach 4.1.0
cachetools 5.0.0
certifi 2021.10.8
cffi 1.15.0
charset-normalizer 2.0.12
click 8.0.4
colorama 0.4.4
cycler 0.11.0
db-dtypes 0.3.1
debugpy 1.5.1
decorator 5.1.1
defusedxml 0.7.1
entrypoints 0.4
executing 0.8.2
fonttools 4.29.1
future 0.18.2
google-api-core 2.5.0
google-auth 2.6.0
google-auth-oauthlib 0.5.0
google-cloud-bigquery 2.34.0
google-cloud-bigquery-storage 2.12.0
google-cloud-core 2.2.2
google-crc32c 1.3.0
google-resumable-media 2.3.0
googleapis-common-protos 1.55.0
grpcio 1.44.0
grpcio-status 1.44.0
idna 3.3
ipykernel 6.9.1
ipython 8.0.1
ipython-genutils 0.2.0
ipywidgets 7.6.5
jedi 0.18.1
Jinja2 3.0.3
joblib 1.1.0
jsonschema 4.4.0
jupyter-client 7.1.2
jupyter-console 6.4.0
jupyter-contrib-core 0.3.3
jupyter-contrib-nbextensions 0.5.1
jupyter-core 4.9.2
jupyter-highlight-selected-word 0.2.0
jupyter-latex-envs 1.4.6
jupyter-nbextensions-configurator 0.4.1
jupyterlab-pygments 0.1.2
jupyterlab-widgets 1.0.2
kiwisolver 1.3.2
lmfit 1.0.3
lxml 4.8.0
MarkupSafe 2.1.0
matplotlib 3.5.1
matplotlib-inline 0.1.3
mistune 0.8.4
mpmath 1.2.1
mypy-extensions 0.4.3
nbclient 0.5.11
nbconvert 5.6.1
nbformat 5.1.3
nest-asyncio 1.5.4
notebook 5.7.10
numpy 1.22.2
oauthlib 3.2.0
packaging 21.3
pandas 1.4.1
pandas-gbq 0.17.1
pandocfilters 1.5.0
parso 0.8.3
pathspec 0.9.0
patsy 0.5.2
pickleshare 0.7.5
Pillow 9.0.1
pip 22.0.3
platformdirs 2.5.1
prometheus-client 0.13.1
prompt-toolkit 3.0.28
proto-plus 1.20.3
protobuf 3.19.4
pure-eval 0.2.2
pyarrow 6.0.1
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.21
pydata-google-auth 1.3.0
Pygments 2.11.2
pyparsing 3.0.7
pyrsistent 0.18.1
python-dateutil 2.8.2
pytz 2021.3
pywin32 303
pywinpty 2.0.2
PyYAML 6.0
pyzmq 22.3.0
qtconsole 5.2.2
QtPy 2.0.1
requests 2.27.1
requests-oauthlib 1.3.1
rsa 4.8
scikit-learn 1.0.2
scipy 1.8.0
seaborn 0.11.2
Send2Trash 1.8.0
setuptools 58.1.0
six 1.16.0
sklearn 0.0
stack-data 0.2.0
statsmodels 0.13.2
sympy 1.9
terminado 0.13.1
testpath 0.6.0
threadpoolctl 3.1.0
tomli 2.0.1
tornado 6.1
traitlets 5.1.1
uncertainties 3.1.6
urllib3 1.26.8
wcwidth 0.2.5
webencodings 0.5.1
widgetsnbextension 3.5.2
So in case anyone comes across similar for any reason with me encountering this probably due getting a new machine and IT doing their voodoo magic transferring my old stuff to this new machine.
Anyhow, there were a bunch of things I still needed to install after I got my new machine and i am not able to exactly pin point what caused issues from my question but in the end I was able to resolve. Follow me there below ...
Checking out my (doing search) python.exe file I found (search returned) 2 paths where python.exe was present. First one was added as an environment variable (added to windows path)
C:\Users-----\AppData\Local\Programs\Python\Python310
C:\Users----\AppData\Roaming\Python\Python310\
Second one not added. Adding roaming version to path variables did not solve the issue and gave additional errors instead:
Fatal error in launcher: Unable to create process using '"C:\Program Files\Python310\python.exe"
So
I uninstalled python (done that before didnt help doing just that alone)
Deleted all environment variables pointing to python (here is what environment variables are just in case - https://www.computerhope.com/issues/ch000549.htm)
Uninstalled python extension from VS code
(https://marketplace.visualstudio.com/items?itemName=ms-python.python)
Deleted Python folders mentioned in the two paths above
Then reinstalled python (clicked add to path during installation)
Reinstalled VS code python extension
Everything works now.
Best of luck
OS: Ubuntu 18.04.6 LTS
Installation:
After running into this issue trying to use pipenv install jupyterlab, I install everything using pip install from within a fresh pipenv shell using Python 3.8.0.
pipenv shell
pip install --upgrade pip
pip install numpy matplotlib jupyterlab ipympl
You can find the Jupyter Lab install doc here.
Running pip list outputs:
Package Version
-------------------- ---------
anyio 3.5.0
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asttokens 2.0.5
attrs 21.4.0
Babel 2.9.1
backcall 0.2.0
black 21.12b0
bleach 4.1.0
certifi 2021.10.8
cffi 1.15.0
charset-normalizer 2.0.10
click 8.0.3
cycler 0.11.0
debugpy 1.5.1
decorator 5.1.1
defusedxml 0.7.1
entrypoints 0.3
executing 0.8.2
fonttools 4.28.5
idna 3.3
importlib-resources 5.4.0
ipykernel 6.7.0
ipympl 0.8.7
ipython 8.0.1
ipython-genutils 0.2.0
ipywidgets 7.6.5
jedi 0.18.1
Jinja2 3.0.3
json5 0.9.6
jsonschema 4.4.0
jupyter-client 7.1.1
jupyter-core 4.9.1
jupyter-server 1.13.3
jupyterlab 3.2.8
jupyterlab-pygments 0.1.2
jupyterlab-server 2.10.3
jupyterlab-widgets 1.0.2
kiwisolver 1.3.2
MarkupSafe 2.0.1
matplotlib 3.5.1
matplotlib-inline 0.1.3
mistune 0.8.4
mypy-extensions 0.4.3
nbclassic 0.3.5
nbclient 0.5.10
nbconvert 6.4.0
nbformat 5.1.3
nest-asyncio 1.5.4
notebook 6.4.7
numpy 1.22.1
packaging 21.3
pandocfilters 1.5.0
parso 0.8.3
pathspec 0.9.0
pexpect 4.8.0
pickleshare 0.7.5
Pillow 9.0.0
pip 21.3.1
pkg_resources 0.0.0
platformdirs 2.4.1
prometheus-client 0.12.0
prompt-toolkit 3.0.24
ptyprocess 0.7.0
pure-eval 0.2.1
pycparser 2.21
Pygments 2.11.2
pyparsing 3.0.7
pyrsistent 0.18.1
python-dateutil 2.8.2
pytz 2021.3
pyzmq 22.3.0
requests 2.27.1
Send2Trash 1.8.0
setuptools 60.5.0
six 1.16.0
sniffio 1.2.0
stack-data 0.1.4
terminado 0.12.1
testpath 0.5.0
tomli 1.2.3
tornado 6.1
traitlets 5.1.1
typing_extensions 4.0.1
urllib3 1.26.8
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.2.3
wheel 0.37.1
widgetsnbextension 3.5.2
zipp 3.7.0
Notably jupyterlab==3.2.8, matplotlib==3.5.1 and ipympl==0.8.7 satisfy the version lookup table
Now running jupyter lab --ip 0.0.0.0 --no-browser from inside the pipenv shell (--ip 0.0.0.0 --no-browser because I'm accessing the notebook on a different machine).
Opening a new notebook with the default Python 3 (ipykernel) kernel, creating two cells
from matplotlib import pyplot as plt
import ipympl # Confirming it is being found by the kernel
%matplotlib widget
# Example found from https://stackoverflow.com/questions/50149562/jupyterlab-interactive-plot
plt.figure()
x = [1,2,3]
y = [4,5,6]
plt.plot(x,y)
plt.show()
Running both cells gives me the common Error message:
Error displaying widget: model not found
What I've already tried:
This question
Where I downgrade:
ipywidgets==7.0.0
ipympl==0.2.1
matplotlib==3.2.0
And install
jupyter labextension install jupyter-matplotlib#0.3.0
No change, same error.
Edit: Using Jupyter Notebook instead of of Jupyter Lab, which means pip install jupyter instead of jupyterlab fixes the issue.
Its what I'll do in lieu of an answer here, but would still like to know if anyone has a straightforward fix for Jupyter Lab.
I followed this tutorial to start a python3 script at startup. The significant files are all stored at /home/pi/Desktop
pi#raspberrypi:~/Desktop $ ls
Jaeger.py launcher.sh logs
pi#raspberrypi:~/Desktop $
There are three files in general:
Jaeger.py Python script which needs python3
launcher.sh Shell script which should be started after boot
logs Folder for log files when the cronjob failed
Jaeger.py
#!/usr/bin/env python
import time
import sys
import curses
import mariadb # => need python3!
from evdev import InputDevice, ecodes, list_devices
...
launcher.sh
#!/bin/sh
# launcher.sh
# navigate to home directory, then to this directory, then execute python script, then back home
/usr/bin/python3 /home/pi/Desktop/Jaeger.py
Crontab
# Notice that tasks will be started based on the cron's system
# daemon's notion of time and timezones.
#
# Output of the crontab jobs (including errors) is sent through
# email to the user the crontab file belongs to (unless redirected).
#
# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/
#
# For more information see the manual pages of crontab(5) and cron(8)
#
# m h dom mon dow command
#reboot sh /home/pi/Desktop/launcher.sh >/home/pi/Desktop/logs/cronlog 2>&1
When executing the launcher.sh shell script via cmd (without sudo) it works!
pi#raspberrypi:~/Desktop $ sh launcher.sh
0011674128
Did it!
Last Inserted ID: None
When executing the launcher.sh shell script via cmd (with sudo) it doesn't work!
pi#raspberrypi:~/Desktop $ sudo sh launcher.sh
Traceback (most recent call last):
File "/home/pi/Desktop/Jaeger.py", line 5, in <module>
import mariadb
ModuleNotFoundError: No module named 'mariadb'
And this is the exact same error message I run into while booting and using the crontab... After boot, I can read this error message in my log files stored in /home/pi/Desktop/logs/cronlog
Why do I get an error with import mariadb when using sudo and why do I get the same error when using the crontab without any sudo cmd? Is the crontab always started as root? Do I have to setup python3 for root?
BTW
pi#raspberrypi:~/Desktop $ python3 -V
Python 3.7.3
pi#raspberrypi:~/Desktop $ python2 -V
Python 2.7.16
pi#raspberrypi:~/Desktop $ which python
/usr/bin/python
pi#raspberrypi:~/Desktop $ which python3
/usr/bin/python3
EDIT0
pi#raspberrypi:~ $ pip list
Package Version
asn1crypto 0.24.0
astroid 2.1.0
asttokens 1.1.13
automationhat 0.2.0
beautifulsoup4 4.7.1
blinker 1.4
blinkt 0.1.2
buttonshim 0.0.2
Cap1xxx 0.1.3
certifi 2018.8.24
chardet 3.0.4
Click 7.0
colorama 0.3.7
colorzero 1.1
cookies 2.2.1
cryptography 2.6.1
cupshelpers 1.0
docutils 0.14
drumhat 0.1.0
entrypoints 0.3
envirophat 1.0.0
evdev 1.4.0
ExplorerHAT 0.4.2
Flask 1.0.2
fourletterphat 0.1.0
gpiozero 1.6.2
guizero 1.2.0
html5lib 1.0.1
idna 2.6
isort 4.3.4
itsdangerous 0.24
jedi 0.13.2
Jinja2 2.10
keyring 17.1.1
keyrings.alt 3.1.1
lazy-object-proxy 1.3.1
logilab-common 1.4.2
lxml 4.3.2
mariadb 1.0.7
MarkupSafe 1.1.0
mccabe 0.6.1
microdotphat 0.2.1
mote 0.0.4
motephat 0.0.3
mypy 0.670
mypy-extensions 0.4.1
numpy 1.16.2
oauthlib 2.1.0
olefile 0.46
pantilthat 0.0.7
parso 0.3.1
pexpect 4.6.0
pgzero 1.2
phatbeat 0.1.1
pianohat 0.1.0
picamera 1.13
piglow 1.2.5
pigpio 1.78
Pillow 5.4.1
pip 18.1
psutil 5.5.1
pycairo 1.16.2
pycrypto 2.6.1
pycups 1.9.73
pygame 1.9.4.post1
Pygments 2.3.1
PyGObject 3.30.4
pyinotify 0.9.6
PyJWT 1.7.0
pylint 2.2.2
pyOpenSSL 19.0.0
pyserial 3.4
pysmbc 1.0.15.6
python-apt 1.8.4.3
pyxdg 0.25
rainbowhat 0.1.0
reportlab 3.5.13
requests 2.21.0
requests-oauthlib 1.0.0
responses 0.9.0
roman 2.0.0
RPi.GPIO 0.7.0
RTIMULib 7.2.1
scrollphat 0.0.7
scrollphathd 1.2.1
SecretStorage 2.3.1
Send2Trash 1.5.0
sense-hat 2.2.0
setuptools 40.8.0
simplejson 3.16.0
six 1.12.0
skywriter 0.0.7
sn3218 1.2.7
soupsieve 1.8
spidev 3.5
ssh-import-id 5.7
thonny 3.3.10
touchphat 0.0.1
twython 3.7.0
typed-ast 1.3.1
unicornhathd 0.0.4
urllib3 1.24.1
webencodings 0.5.1
Werkzeug 0.14.1
wheel 0.32.3
wrapt 1.10.11
pi#raspberrypi:~ $ pip3 list
Package Version
asn1crypto 0.24.0
astroid 2.1.0
asttokens 1.1.13
automationhat 0.2.0
beautifulsoup4 4.7.1
blinker 1.4
blinkt 0.1.2
buttonshim 0.0.2
Cap1xxx 0.1.3
certifi 2018.8.24
chardet 3.0.4
Click 7.0
colorama 0.3.7
colorzero 1.1
cookies 2.2.1
cryptography 2.6.1
cupshelpers 1.0
docutils 0.14
drumhat 0.1.0
entrypoints 0.3
envirophat 1.0.0
evdev 1.4.0
ExplorerHAT 0.4.2
Flask 1.0.2
fourletterphat 0.1.0
gpiozero 1.6.2
guizero 1.2.0
html5lib 1.0.1
idna 2.6
isort 4.3.4
itsdangerous 0.24
jedi 0.13.2
Jinja2 2.10
keyring 17.1.1
keyrings.alt 3.1.1
lazy-object-proxy 1.3.1
logilab-common 1.4.2
lxml 4.3.2
mariadb 1.0.7
MarkupSafe 1.1.0
mccabe 0.6.1
microdotphat 0.2.1
mote 0.0.4
motephat 0.0.3
mypy 0.670
mypy-extensions 0.4.1
numpy 1.16.2
oauthlib 2.1.0
olefile 0.46
pantilthat 0.0.7
parso 0.3.1
pexpect 4.6.0
pgzero 1.2
phatbeat 0.1.1
pianohat 0.1.0
picamera 1.13
piglow 1.2.5
pigpio 1.78
Pillow 5.4.1
pip 18.1
psutil 5.5.1
pycairo 1.16.2
pycrypto 2.6.1
pycups 1.9.73
pygame 1.9.4.post1
Pygments 2.3.1
PyGObject 3.30.4
pyinotify 0.9.6
PyJWT 1.7.0
pylint 2.2.2
pyOpenSSL 19.0.0
pyserial 3.4
pysmbc 1.0.15.6
python-apt 1.8.4.3
pyxdg 0.25
rainbowhat 0.1.0
reportlab 3.5.13
requests 2.21.0
requests-oauthlib 1.0.0
responses 0.9.0
roman 2.0.0
RPi.GPIO 0.7.0
RTIMULib 7.2.1
scrollphat 0.0.7
scrollphathd 1.2.1
SecretStorage 2.3.1
Send2Trash 1.5.0
sense-hat 2.2.0
setuptools 40.8.0
simplejson 3.16.0
six 1.12.0
skywriter 0.0.7
sn3218 1.2.7
soupsieve 1.8
spidev 3.5
ssh-import-id 5.7
thonny 3.3.10
touchphat 0.0.1
twython 3.7.0
typed-ast 1.3.1
unicornhathd 0.0.4
urllib3 1.24.1
webencodings 0.5.1
Werkzeug 0.14.1
wheel 0.32.3
wrapt 1.10.11