When I click on Jupyter Notebook in Anaconda Navigator, I am receiving this error. I was just using Jupyter Notebook and had no issues. I restarted my computer and now I am receiving this.
Traceback (most recent call last):
File "C:\Users\csu5141\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in
from notebook.notebookapp import main
File "C:\Users\csu5141\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 44, in
from jinja2 import Environment, FileSystemLoader
File "C:\Users\csu5141\Anaconda3\lib\site-packages\jinja2\__init__.py", line 12, in
from .environment import Environment
File "C:\Users\csu5141\Anaconda3\lib\site-packages\jinja2\environment.py", line 25, in
from .defaults import BLOCK_END_STRING
File "C:\Users\csu5141\Anaconda3\lib\site-packages\jinja2\defaults.py", line 3, in
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File "C:\Users\csu5141\Anaconda3\lib\site-packages\jinja2\filters.py", line 13, in
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (C:\Users\csu5141\Anaconda3\lib\site-packages\markupsafe\__init__.py)
```
inside environment terminal use pip install markupsafe==2.0.1
Related
I am totally new to Python/Jupyter notebook.
Using Windows 11. I installed latest version python Python 3.11.1. Also latest Anaconda - conda 22.9.0.
My jupyter notebook (installed by anaconda) does not start from command line:
jupyter notebook
Traceback (most recent call last):
File "C:\apps\anaconda\Scripts\jupyter-notebook-script.py", line 6, in from notebook.notebookapp import main
File "C:\apps\anaconda\lib\site-packages\notebook\notebookapp.py", line 77, in from .services.kernels.kernelmanager import MappingKernelManager, AsyncMappingKernelManager
File "C:\apps\anaconda\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 18, in
from jupyter_client.session import Session
File "C:\apps\anaconda\lib\site-packages\jupyter_client_init_.py", line 8, in from .asynchronous import AsyncKernelClient # noqa
File "C:\apps\anaconda\lib\site-packages\jupyter_client\asynchronous_init_.py", line 1, in
from .client import AsyncKernelClient # noqa
File "C:\apps\anaconda\lib\site-packages\jupyter_client\asynchronous\client.py", line 6, in
from jupyter_client.channels import HBChannel
File "C:\apps\anaconda\lib\site-packages\jupyter_client\channels.py", line 12, in import zmq.asyncio
File "C:\apps\anaconda\lib\site-packages\zmq_init_.py", line 103, in from zmq import backend
File "C:\apps\anaconda\lib\site-packages\zmq\backend_init_.py", line 31, in raise original_error from None
File "C:\apps\anaconda\lib\site-packages\zmq\backend_init_.py", line 26, in ns = select_backend(first)
File "C:\apps\anaconda\lib\site-packages\zmq\backend\select.py", line 31, in select_backend mod = import_module(name)
File "C:\apps\anaconda\lib\importlib_init.py", line 127, in import_module return _bootstrap.gcd_import(name[level:], package, level)
File "C:\apps\anaconda\lib\site-packages\zmq\backend\cython_init.py", line 6, in
from . import (ImportError: DLL load failed while importing _device: The specified module could not be found.
Conda documentation states "Anaconda supports Python 3.7, 3.8, 3.9 and 3.10. The current default is Python 3.9."
Should I just downgrade my python to 3.9 or 3.10 (I dont care) ?? Any other work arounds?
Updates
Could open the jupyter notebook from the conda prompt. Not stated using it yet. So lets see. If python compatibility issues need to be resolved - need to figure it out.
But, cant start the anaconda-navigator. When I try start from windows start menu - does nothing. From Conda prompt: I get the flwg error on the prompt: >anaconda-navigator Traceback (most recent call last): File "C:\apps\anaconda\Scripts\anaconda-navigator-script.py", line 6, in <module> from anaconda_navigator.app.main import main File "C:\apps\anaconda\lib\site-packages\anaconda_navigator\app\main.py", line 19, in <module> from anaconda_navigator.app.start import start_app File "C:\apps\anaconda\lib\site-packages\anaconda_navigator\app\start.py", line 15, in <module> from qtpy.QtCore import QCoreApplication, QEvent, QObject, Qt # pylint: disable=no-name-in-module File "C:\apps\anaconda\lib\site-packages\qtpy\QtCore.py", line 15, in <module> from PyQt5.QtCore import * ImportError: DLL load failed while importing QtCore: The specified procedure could not be found.
Greetings: please neither jupyterlab, jupyternotebook, spyder none of them are working, it keeps giving me bunch of dependency errors and i don't even understand the errors: below are some when i launch spyder
Traceback (most recent call last):
File "/Users/mac/Public/anaconda3/bin/spyder", line 11, in
sys.exit(main())
File "/Users/mac/Public/anaconda3/lib/python3.9/site-packages/spyder/app/start.py", line 128, in main
from spyder.config.manager import CONF
File "/Users/mac/Public/anaconda3/lib/python3.9/site-packages/spyder/config/manager.py", line 22, in
from spyder.config.main import CONF_VERSION, DEFAULTS, NAME_MAP
File "/Users/mac/Public/anaconda3/lib/python3.9/site-packages/spyder/config/main.py", line 21, in
from spyder.config.appearance import APPEARANCE
File "/Users/mac/Public/anaconda3/lib/python3.9/site-packages/spyder/config/appearance.py", line 15, in
from spyder.plugins.help.utils.sphinxify import CSS_PATH
File "/Users/mac/Public/anaconda3/lib/python3.9/site-packages/spyder/plugins/help/utils/sphinxify.py", line 34, in
from jinja2 import Environment, FileSystemLoader
File "/Users/mac/Public/anaconda3/lib/python3.9/site-packages/jinja2/init.py", line 12, in
from .environment import Environment
File "/Users/mac/Public/anaconda3/lib/python3.9/site-packages/jinja2/environment.py", line 25, in
from .defaults import BLOCK_END_STRING
File "/Users/mac/Public/anaconda3/lib/python3.9/site-packages/jinja2/defaults.py", line 3, in
from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401
File "/Users/mac/Public/anaconda3/lib/python3.9/site-packages/jinja2/filters.py", line 13, in
from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/Users/mac/.local/lib/python3.9/site-packages/markupsafe/init.py)
PS. anyone who understands what's happening should please help me i need to submit a project today
i already uninstalled and installed new anaconda, i tried downgrading it, i tried importing some of the dependency manually. yet all show to no avail
Very messy tonight. It was working fine before until I tried to upgrade tensorflow to 2.6. it failed, then all other packages also broke. for example, I cannot launch jupypter notebook. I did try to upgrade it by using conda update jupyter. Thanks for your help.
(forecast) C:\Python_Sync\ML timeseries>jupyter notebook
Traceback (most recent call last):
File "C:\Users\test\miniconda3\envs\forecast\Scripts\jupyter-notebook-script.py", line 5, in <module>
from notebook.notebookapp import main
File "C:\Users\test\miniconda3\envs\forecast\lib\site-packages\notebook\notebookapp.py", line 78, in <module>
from .services.kernels.kernelmanager import MappingKernelManager, AsyncMappingKernelManager
File "C:\Users\test\miniconda3\envs\forecast\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 18, in <module>
from jupyter_client.session import Session
File "C:\Users\test\miniconda3\envs\forecast\lib\site-packages\jupyter_client\__init__.py", line 11, in <module>
from .manager import AsyncKernelManager # noqa
File "C:\Users\test\miniconda3\envs\forecast\lib\site-packages\jupyter_client\manager.py", line 29, in <module>
from .provisioning import KernelProvisionerBase
ImportError: cannot import name 'KernelProvisionerBase' from 'jupyter_client.provisioning' (unknown location)
ok, i ended up solving this after:
conda update --all
I am running the latest Anaconda on OS X 11 and cannot for the life of me figure out how to get jupyter notebook to run. It ends in this error:
% jupyter notebook
Traceback (most recent call last):
File "/usr/local/opt/anaconda3/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main
File "/usr/local/opt/anaconda3/lib/python3.7/site-packages/notebook/notebookapp.py", line 85, in <module>
from .services.contents.manager import ContentsManager
File "/usr/local/opt/anaconda3/lib/python3.7/site-packages/notebook/services/contents/manager.py", line 17, in <module>
from nbformat import sign, validate as validate_nb, ValidationError
File "/usr/local/opt/anaconda3/lib/python3.7/site-packages/nbformat/__init__.py", line 32, in <module>
from .validator import validate, ValidationError
File "/usr/local/opt/anaconda3/lib/python3.7/site-packages/nbformat/validator.py", line 12, in <module>
from .json_compat import get_current_validator, ValidationError
File "/usr/local/opt/anaconda3/lib/python3.7/site-packages/nbformat/json_compat.py", line 10, in <module>
import jsonschema
File "/usr/local/opt/anaconda3/lib/python3.7/site-packages/jsonschema/__init__.py", line 32, in <module>
from pkg_resources import get_distribution
ModuleNotFoundError: No module named 'pkg_resources'
I have tried fresh installs of both miniconda and anaconda without success. Nothing seems to work.
It baffles me that a default install of anaconda (no updates, no extra packages, nothing) is broken. Do these people even test their stuff?
Any solutions or suggestions? Thanks in advance!
When launching Juypter from Anaconda I receive the following error message:
Traceback (most recent call last):
File "C:\Users\ceo20\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in
from notebook.notebookapp import main
File "C:\Users\ceo20\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 80, in
from .services.kernels.kernelmanager import MappingKernelManager
File "C:\Users\ceo20\Anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 19, in
from jupyter_client.session import Session
File "C:\Users\ceo20\Anaconda3\lib\site-packages\jupyter_client__init__.py", line 4, in
from .connect import *
File "C:\Users\ceo20\Anaconda3\lib\site-packages\jupyter_client\connect.py", line 35, in
from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write
ImportError: cannot import name 'secure_write' from 'jupyter_core.paths' (C:\Users\ceo20\Anaconda3\lib\site-packages\jupyter_core\paths.py)
Any thoughts?
Try this in Anaconda prompt
pip install --upgrade jupyter_client
pip install --upgrade jupyter_client
This package provides the Python API for starting, managing and communicating with Jupyter kernels. The above code will upgrade jupyter client.