Jupyter Lab Not Opening - python

I am a beginner. Please help. When I pass the jupyter lab command the following error occurs:-
Traceback (most recent call last):
File "c:\users\parijat basak\anaconda3\lib\site-packages\jupyterlab_server\server.py", line 20, in <module>
from notebook.notebookapp import aliases, flags, NotebookApp as ServerApp
File "c:\users\parijat basak\anaconda3\lib\site-packages\notebook\notebookapp.py", line 51, in <module>
from zmq.eventloop import ioloop
File "C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\__init__.py", line 50, in <module>
from zmq import backend
File "C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython' (most likely due to a circular import) (C:\Users\Parijat Basak\AppData\Roaming\Python\Python38\site-packages\zmq\backend\cython\__init__.py)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\parijat basak\anaconda3\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\parijat basak\anaconda3\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\Parijat Basak\anaconda3\Scripts\jupyter-lab.EXE\__main__.py", line 4, in <module>
File "c:\users\parijat basak\anaconda3\lib\site-packages\jupyterlab\labapp.py", line 14, in <module>
from jupyterlab_server import slugify, WORKSPACE_EXTENSION
File "c:\users\parijat basak\anaconda3\lib\site-packages\jupyterlab_server\__init__.py", line 4, in <module>
from .app import LabServerApp
File "c:\users\parijat basak\anaconda3\lib\site-packages\jupyterlab_server\app.py", line 9, in <module>
from .server import ServerApp
File "c:\users\parijat basak\anaconda3\lib\site-packages\jupyterlab_server\server.py", line 26, in <module>
from jupyter_server.base.handlers import ( # noqa
ModuleNotFoundError: No module named 'jupyter_server'
Please help!!! I am unable to use Jupyter Lab anymore and it is extremly problematic for me!
Thank You.

From my point of view, it may be faster, and easier is to reinstall Jupyter Lab (maybe create a new conda environment if needed).
One more thing, you might consider backing up your conda environment when everything is smooth:
https://www.anaconda.com/blog/moving-conda-environments

Related

When I execute this command (shub login), in python I get error. I execute this command after installing the shub package

Traceback (most recent call last):
File "C:\Users\mohammadprgrm\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\mohammadprgrm\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "C:\Users\mohammadprgrm\Desktop\py\env\Scripts\shub.exe\__main__.py", line 4, in <module>
File "C:\Users\mohammadprgrm\Desktop\py\env\lib\site-packages\shub\tool.py", line 7, in <module>
from shub.utils import update_available
File "C:\Users\mohammadprgrm\Desktop\py\env\lib\site-packages\shub\utils.py", line 42, in <module>
from scrapinghub import ScrapinghubClient, ScrapinghubAPIError, HubstorageClient
File "C:\Users\mohammadprgrm\Desktop\py\env\lib\site-packages\scrapinghub\__init__.py", line 13, in <module>
from .hubstorage import HubstorageClient
File "C:\Users\mohammadprgrm\Desktop\py\env\lib\site-packages\scrapinghub\hubstorage\__init__.py", line 6, in <module>
from .client import HubstorageClient
File "C:\Users\mohammadprgrm\Desktop\py\env\lib\site-packages\scrapinghub\hubstorage\client.py", line 8, in <module>
from .project import Project
File "C:\Users\mohammadprgrm\Desktop\py\env\lib\site-packages\scrapinghub\hubstorage\project.py", line 3, in <module>
from .job import Job
File "C:\Users\mohammadprgrm\Desktop\py\env\lib\site-packages\scrapinghub\hubstorage\job.py", line 2, in <module>
from .resourcetype import (ItemsResourceType, DownloadableResource,
File "C:\Users\mohammadprgrm\Desktop\py\env\lib\site-packages\scrapinghub\hubstorage\resourcetype.py", line 5, in <module>
from collections import MutableMapping
ImportError: cannot import name 'MutableMapping' from 'collections' (C:\Users\mohammadprgrm\AppData\Local\Programs\Python\Python310\lib\collections\__init__.py)
That version of the scrapinghub package is evidently not compatible with Python 3.10.
Downgrade to Python 3.9, or upgrade the package to a new, compatible version if there is one which there may not be yet: https://github.com/scrapinghub/python-scrapinghub/issues/160

Cannot run pip due to a circular import in pip itself

I created a new virtual environment, and installed a package (particularly, cvxpy). I ran some tests and it worked fine. Then, for no apparent reason, I started getting errors when running pip:
(.venv39a) PS D:\Dropbox\ariel-algorithms\cvxpy> python -m pip
Traceback (most recent call last):
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "D:\Dropbox\ariel-algorithms\cvxpy\.venv39a\lib\site-packages\pip\__main__.py", line 29, in <module>
from pip._internal.cli.main import main as _main
File "D:\Dropbox\ariel-algorithms\cvxpy\.venv39a\lib\site-packages\pip\_internal\cli\main.py", line 9, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "D:\Dropbox\ariel-algorithms\cvxpy\.venv39a\lib\site-packages\pip\_internal\cli\autocompletion.py", line 12, in <module>
from pip._internal.metadata import get_default_environment
File "D:\Dropbox\ariel-algorithms\cvxpy\.venv39a\lib\site-packages\pip\_internal\metadata\__init__.py", line 3, in <module> from .base import (BaseDistribution, BaseEnvironment, FilesystemWheel,
File "D:\Dropbox\ariel-algorithms\cvxpy\.venv39a\lib\site-packages\pip\_internal\metadata\base.py", line 22, in <module>
from pip._vendor.packaging.requirements import Requirement
File "D:\Dropbox\ariel-algorithms\cvxpy\.venv39a\lib\site-packages\pip\_vendor\packaging\requirements.py", line 12, in <module>
from pip._vendor.pyparsing import Combine
File "D:\Dropbox\ariel-algorithms\cvxpy\.venv39a\lib\site-packages\pip\_vendor\pyparsing\__init__.py", line 135, in <module>
from .common import _builtin_exprs as common_builtin_exprs
File "D:\Dropbox\ariel-algorithms\cvxpy\.venv39a\lib\site-packages\pip\_vendor\pyparsing\common.py", line 5, in <module>
from .helpers import any_close_tag, any_open_tag, delimited_list
File "D:\Dropbox\ariel-algorithms\cvxpy\.venv39a\lib\site-packages\pip\_vendor\pyparsing\helpers.py", line 5, in <module>
from . import __diag__
ImportError: cannot import name '__diag__' from partially initialized module 'pip._vendor.pyparsing' (most likely due to a circular import) (D:\Dropbox\ariel-algorithms\cvxpy\.venv39a\lib\site-packages\pip\_vendor\pyparsing\__init__.py)
It says there is a circular import in pip itself - how can this be?
I tried to remove the virtual environment and re-install everything, but after some time, it happened again. How can I debug this strange circular import, in pip itself?

Launching Spyder yields DLL importing error during `import zmq`

I receive the following error whenever I attempt to launch Spyder:
Traceback (most recent call last):
File "C:\Users\HP\anaconda3\Scripts\spyder-script.py", line 6, in
from spyder.app.start import main
File "C:\Users\HP\anaconda3\lib\site-packages\spyder\app\start.py", line 22, in
import zmq
File "C:\Users\HP\anaconda3\lib\site-packages\zmq\__init__.py", line 47, in
from zmq import backend
File "C:\Users\HP\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in
reraise(*exc_info)
File "C:\Users\HP\anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\HP\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in
_ns = select_backend(first)
File "C:\Users\HP\anaconda3\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\HP\anaconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in
from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.
This is an Anaconda 3 installation on Windows. How can I get this to work correctly?

Pip error shows up when I enter any and every pip command

When I tried to install discord.py, I saw an error. When I simply enter the pip command, I see this error again . I tried other pip commands, result was same. I reinstalled python but it did not help.
Error:
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.1776.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip\__main__.py", line 23, in <module>
from pip._internal.cli.main import main as _main # isort:skip # noqa
File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip\_internal\cli\main.py", line 10, in <module>
from pip._internal.cli.autocompletion import autocomplete
File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip\_internal\cli\autocompletion.py", line 9, in <module>
from pip._internal.cli.main_parser import create_main_parser
File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip\_internal\cli\main_parser.py", line 7, in <module>
from pip._internal.cli import cmdoptions
File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip\_internal\cli\cmdoptions.py", line 23, in <module>
from pip._internal.cli.progress_bars import BAR_TYPES
File "C:\Users\admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip\_internal\cli\progress_bars.py", line 8, in <module>
from pip._vendor.progress.bar import Bar, FillingCirclesBar, IncrementalBar
ModuleNotFoundError: No module named 'pip._vendor.progress
If you don't have python 3.4 or later pip may not be installed.
To check if it is installed use:
C:\Users\Your Name\AppData\Local\Programs\Python\Python36-32\Scripts>pip --version.
If it isn't installed - follow this link: https://www.w3schools.com/python/python_pip.asp

Conda Jupyer Notebook

After creating an environment in anaconda and installing tensorflow, I could not open Jupyter notebook, do I have to switch to base environment to open the notebook or I have done something wrong
D:\Anaconda3\lib\site-packages\zmq\backend\cffi\__pycache__\_cffi_ext.c(213): fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory
Traceback (most recent call last):
File "D:\Anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
from notebook.notebookapp import main
File "D:\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 47, in <module>
from zmq.eventloop import ioloop
File "D:\Anaconda3\lib\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "D:\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "D:\Anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "D:\Anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "D:\Anaconda3\lib\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "D:\Anaconda3\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.

Categories

Resources