Please let me know the solution to fix it as didn't find much on google.
Faced this error while trying to start jupyter notebook from anaconda.
But can open it from cmd.
Environment variables of anaconda are properly configured.
Traceback (most recent call last):
File "C:\Users\Ankit Chawrai\anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
from notebook.notebookapp import main
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\notebook\notebookapp.py", line 51, in <module>
from zmq.eventloop import ioloop
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\__init__.py", line 50, in <module>
from zmq import backend
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Ankit Chawrai\anaconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed while importing error: The specified module could not be found.```
I always launch Jupyter Notebooks from either from the Windows menu or the Anaconda Navigator. Almost always from the Windows Start Menu.
When I installed Anaconda a shortcut was created within the Start Menu, and when clicked it launches a cmd window, runs some scripts and then opens the Jupyter Explorer page within my default browser.
Related
Traceback (most recent call last):
File "/home/mohit/anaconda3/bin/jupyter-notebook", line 7, in
from notebook.notebookapp import main
File "/home/mohit/anaconda3/lib/python3.8/site-packages/notebook/notebookapp.py", line 83, in
from .services.kernels.kernelmanager import MappingKernelManager, AsyncMappingKernelManager
File "/home/mohit/anaconda3/lib/python3.8/site-packages/notebook/services/kernels/kernelmanager.py", line 18, in
from jupyter_client.session import Session
File "/home/mohit/anaconda3/lib/python3.8/site-packages/jupyter_client/session.py", line 41, in
from jupyter_client.jsonutil import extract_dates, squash_dates, date_default
File "/home/mohit/anaconda3/lib/python3.8/site-packages/jupyter_client/jsonutil.py", line 10, in
from dateutil.parser import parse as _dateutil_parse
File "/home/mohit/anaconda3/lib/python3.8/site-packages/dateutil/parser.py", line 158
l.append("%s=%s" % (attr, `value`))
^
SyntaxError: invalid syntax
pip install python-dateutil --upgrade will solve your problem
I recently modified my conda virtual environment to try installing a package (openjpeg) because of issues I was running into with pydicom. I restarted my Jupyter Notebook, but then it seemed something I did completely messed up my ability to load the environment in Jupyter Notebook. I tried recreating the environment from scratch and manually installing my needed packages, but got the same error. After I load jupyter notebook from command line and open my .ipynb file using the environment kernel, I get the error copied below in the cmd/miniconda window:
[I 00:22:55.851 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\site-packages\ipykernel_launcher.py", line 15, in <module>
from ipykernel import kernelapp as app
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\site-packages\ipykernel\__init__.py", line 2, in <module>
from .connect import *
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\site-packages\ipykernel\connect.py", line 18, in <module>
import jupyter_client
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\site-packages\jupyter_client\__init__.py", line 4, in <module>
from .connect import *
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\site-packages\jupyter_client\connect.py", line 21, in <module>
import zmq
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\site-packages\zmq\__init__.py", line 55, in <module>
from zmq import backend
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\ProgramData\Anaconda3\envs\Py36Base\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.
[W 00:22:58.870 NotebookApp] KernelRestarter: restart failed
[W 00:22:58.870 NotebookApp] Kernel 30d40c82-f840-47cc-8192-54aeb028d1aa died, removing from map.
Any thoughts on what I can do to fix this? I saw some posts with similar errors (but different issue overall) and the most comomon solution was making sure the Anaconda system environment PATH variable is set (which it is). For the record I'm running Windows 10 and latest Anaconda install (first environment using Python 3.8, re-built environment using Python 3.6). If you think I should copy my conda list output for the virtual environment let me know
It seems a rather simple fix was to activate the environment and then run jupyter notebook. That seemed to stop the error. Was not aware this was a requirement?
I have problem with starting my jupyter notebook after uninstalling and updating of sklearn library
as below.
conda uninstall scikit-learn --yes
conda install scikit-learn==0.23.1
I can not start my jupyter notebook from ANACONDA NAGIGATOR by clicking the jupyter notebook launch button.
The Application launch error says,
Traceback (most recent call last):
File "D:\Anaconda3\lib\site-packages\jsonschema\__init__.py", line 31, in
from importlib import metadata
ImportError: cannot import name 'metadata' from 'importlib' (D:\Anaconda3\lib\importlib\__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "D:\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in
from notebook.notebookapp import main
File "D:\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 85, in
from .services.contents.manager import ContentsManager
File "D:\Anaconda3\lib\site-packages\notebook\services\contents\manager.py", line 17, in
from nbformat import sign, validate as validate_nb, ValidationError
File "D:\Anaconda3\lib\site-packages\nbformat\__init__.py", line 32, in
from .validator import validate, ValidationError
File "D:\Anaconda3\lib\site-packages\nbformat\validator.py", line 12, in
from .json_compat import get_current_validator, ValidationError
File "D:\Anaconda3\lib\site-packages\nbformat\json_compat.py", line 10, in
import jsonschema
File "D:\Anaconda3\lib\site-packages\jsonschema\__init__.py", line 33, in
import importlib_metadata as metadata
ModuleNotFoundError: No module named 'importlib_metadata'
Dose anyone know how to solve this problem?
I am using the Anaconda environment for python.
I have installed the paramiko (v. 2.0.2) and cryptography (v 1.5) modules using the Anaconda Navigator..
When I try to execute this import statement:
import netmiko
I get an error message "ImportError: No module named cryptography.hazmat.backends"
The total output in the cmd window is:
>>> import netmiko
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "build\bdist.win-amd64\egg\netmiko\__init__.py", line 1, in <module>
File "build\bdist.win-amd64\egg\netmiko\ssh_dispatcher.py", line 3, in <module>
File "build\bdist.win-amd64\egg\netmiko\cisco\__init__.py", line 1, in <module>
File "build\bdist.win-amd64\egg\netmiko\cisco\cisco_ios_ssh.py", line 1, in <module>
File "build\bdist.win-amd64\egg\netmiko\ssh_connection.py", line 3, in <module>
File "build\bdist.win-amd64\egg\netmiko\base_connection.py", line 13, in <module>
File "build\bdist.win-amd64\egg\paramiko\__init__.py", line 30, in <module>
File "build\bdist.win-amd64\egg\paramiko\transport.py", line 32, in <module>
ImportError: No module named cryptography.hazmat.backends
Does anyone know how to fix this?
Any help is appreciated.
I guess the right order for the commands would be:
#apt-get update
#apt-get install python-dev
#apt-get install libffi-dev
#pip install cryptography
It solved the issue in my case
You're probably running into a problem because you don't have libffi-dev installed. Installing "python-dev" and "libffi-dev" at the OS layer may help.
I've just installed a new plone 4.3 instance in a folder which already contained 2 Plone 4.3 instance, which both work fine. When I try to run buildout I get this error:
Traceback (most recent call last):
File "bin/buildout", line 17, in <module>
import zc.buildout.buildout
File "/usr/local/Plone4.3/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/buildout.py", line 40, in <module>
import zc.buildout.download
File "/usr/local/Plone4.3/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/download.py", line 20, in <module>
from zc.buildout.easy_install import realpath
File "/usr/local/Plone4.3/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/easy_install.py", line 31, in <module>
import setuptools.package_index
File "/usr/local/Plone4.3/Python-2.7/lib/python2.7/site-packages/distribute-0.6.35-py2.7.egg/setuptools/package_index.py", line 158, in <module>
sys.version[:3], require('distribute')[0].version
File "/usr/local/Plone4.3/buildout-cache/eggs/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 666, in require
continue # try the next older version of project
File "/usr/local/Plone4.3/buildout-cache/eggs/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve
pkg_resources.DistributionNotFound: distribute
Google has failed me. Can anyone tell me how to resolve this error?