While attempting to run jupyter notebook in python3.6.3 on my gnome terminal I get the following output, running on UBUNTU:
Traceback (most recent call last):
File "/home/willem/.local/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 10, in <module>
import sqlite3
File "/usr/local/lib/python3.6/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/lib/python3.6/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/willem/.local/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main
File "/home/willem/.local/lib/python3.6/site-packages/notebook/notebookapp.py", line 81, in <module>
from .services.sessions.sessionmanager import SessionManager
File "/home/willem/.local/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 13, in <module>
from pysqlite2 import dbapi2 as sqlite3
ModuleNotFoundError: No module named 'pysqlite2'
However, the module sqlite3 is present in my python3.6.3 directory. Which makes the problem rather vague.
Any suggestions for this problem to be fixed will be greatly appreciated
Related
I've added "C:\Users\sj\anaconda3\Scripts" to System environment variable list, but I got the following result.
C:\Users\sj>jupyter-lab
Traceback (most recent call last):
File "C:\Users\sj\anaconda3\lib\site-packages\jupyter_server\services\sessions\sessionmanager.py", line 8, in <module>
import sqlite3
File "C:\Users\sj\anaconda3\lib\sqlite3\__init__.py", line 57, in <module>
from sqlite3.dbapi2 import *
File "C:\Users\sj\anaconda3\lib\sqlite3\dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: DLL load failed while importing _sqlite3: The specified module could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\sj\anaconda3\Scripts\jupyter-lab-script.py", line 5, in <module>
from jupyterlab.labapp import main
File "C:\Users\sj\anaconda3\lib\site-packages\jupyterlab\labapp.py", line 13, in <module>
from jupyter_server.serverapp import flags
File "C:\Users\sj\anaconda3\lib\site-packages\jupyter_server\serverapp.py", line 83, in <module>
from jupyter_server.services.sessions.sessionmanager import SessionManager
File "C:\Users\sj\anaconda3\lib\site-packages\jupyter_server\services\sessions\sessionmanager.py", line 11, in <module>
from pysqlite2 import dbapi2 as sqlite3
ModuleNotFoundError: No module named 'pysqlite2'
Could anyone help me to fix this and make "jupyter-lab" and "jupyter-notebook" global?
I have tried by installing spacy in new virtual environment as well just in case if there are any module version clashes but still gives the same error upon doing the spacy import
import spacy
Also tried with downgrading of the spacy version to 2.2.2.
Error Log:
Traceback (most recent call last):
File "/Users/testUser/.virtualenvs/mlv3/lib/python3.7/site-packages/catalogue.py", line 8, in <module>
import importlib.metadata as importlib_metadata
ModuleNotFoundError: No module named 'importlib.metadata'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/testUser/Desktop/ml/test-project/src/EmailParser.py", line 3, in <module>
import spacy
File "/Users/testUser/.virtualenvs/mlv3/lib/python3.7/site-packages/spacy/__init__.py", line 10, in <module>
from thinc.neural.util import prefer_gpu, require_gpu
File "/Users/testUser/.virtualenvs/mlv3/lib/python3.7/site-packages/thinc/__init__.py", line 8, in <module>
from ._registry import registry
File "/Users/testUser/.virtualenvs/mlv3/lib/python3.7/site-packages/thinc/_registry.py", line 1, in <module>
import catalogue
File "/Users/testUser/.virtualenvs/mlv3/lib/python3.7/site-packages/catalogue.py", line 10, in <module>
import importlib_metadata
File "/Users/testUser/.virtualenvs/mlv3/lib/python3.7/site-packages/importlib_metadata/__init__.py", line 16, in <module>
from ._compat import (
File "/Users/testUser/.virtualenvs/mlv3/lib/python3.7/site-packages/importlib_metadata/_compat.py", line 115, in <module>
email.message_from_string
AttributeError: module 'email' has no attribute 'message_from_string'
I am working on Win10, 64bit. I have installed "Anaconda3-2019.03-Windows-x86_64". When I am going to launch Jupyter from Anaconda,the following error occurs:
Traceback (most recent call last):
File "C:\Users\usatapat\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 10, in
import sqlite3
File "C:\Users\usatapat\AppData\Local\Continuum\anaconda3\lib\sqlite3\__init__.py", line 23, in
from sqlite3.dbapi2 import *
File "C:\Users\usatapat\AppData\Local\Continuum\anaconda3\lib\sqlite3\dbapi2.py", line 27, in
from _sqlite3 import *
ImportError: DLL load failed: The specified procedure could not be found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\usatapat\AppData\Local\Continuum\anaconda3\Scripts\jupyter-notebook-script.py", line 6, in
from notebook.notebookapp import main
File "C:\Users\usatapat\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\notebookapp.py", line 86, in
from .services.sessions.sessionmanager import SessionManager
File "C:\Users\usatapat\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 13, in
from pysqlite2 import dbapi2 as sqlite3
ModuleNotFoundError: No module named 'pysqlite2' "
I have uninstalled and installed anaconda. But still this issue not resolved.
I was running a Tensorflow code then interrupted it via ctrl+c. I then re-ran it immediately after (without making any adjustments to the code) and am now unable to import anything, even Tensorflow. I looked through some internet searches for a similar problem but have yet to find any that is related.
Re-running the script:
(env_maskrcnn) haziq#vita-workstation2:~/human-pose-3d$ ./run2.sh
Traceback (most recent call last):
File "src/predict_3dpose.py", line 13, in <module>
import h5py
ModuleNotFoundError: No module named 'h5py'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "src/predict_3dpose.py", line 13, in <module>
import h5py
ModuleNotFoundError: No module named 'h5py'
Launching Python 3 to import Tensorflow:
(env_maskrcnn) haziq#vita-workstation2:~/human-pose-3d$ python3
Python 3.7.1 (default, Oct 22 2018, 11:21:55)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow as tf
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'tensorflow'
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 24, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Following the instructions given by Manish Dash, I checked the path that Python is pointing to. I am using Python 3 and it looks like it isn't not pointing to the correct path. I also checked the folder /home/haziq/env_maskrcnn/bin/ but did not see a python3 file. What could have happened and how do I fix it?
haziq#vita-workstation2:~$ source env_maskrcnn/bin/activate
(env_maskrcnn) haziq#vita-workstation2:~$ which python
/home/haziq/env_maskrcnn/bin/python
(env_maskrcnn) haziq#vita-workstation2:~$ which python3
/usr/bin/python3
When I run a project used Pytorch I came up with this error:
Traceback (most recent call last):
File "train_drnet.py", line 10, in <module>
import utils
File "/home/muse/drnet-py/utils.py", line 18, in <module>
from data.kth import KTH
File "/home/muse/drnet-py/data/kth.py", line 7, in <module>
from torch.utils.serialization import load_lua
ModuleNotFoundError: No module named 'torch.utils.serialization'
how to solve this,please?
I think it was removed from Pytorch about a year ago, you can try tourch file instead - https://github.com/bshillingford/python-torchfile