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
Related
i'm trying install https://github.com/eth0izzle/bucket-stream in homebrew hyper not vs code or similiar , but each time i write an order it gives this error
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/bin/pip", line 5, in <module>
from pip import main
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/__init__.py", line 14, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/utils/__init__.py", line 27, in <module>
from pip._vendor import pkg_resources
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_vendor/pkg_resources/__init__.py", line 32, in <module>
import symbol
ModuleNotFoundError: No module named 'symbol'
i tried everything online ,
No Module Named 'Symbol'
https://www.roseindia.net/answers/viewqa/pythonquestions/231919-ModuleNotFoundError-No-module-named-symbols.html
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 recently tried to downgrade pandas to version 1.2.3 using pip, but clearly messed something up. Sadly I was not in my environment so it is messed up everywhere. How do I get correct for this?
I have homebrew too.
Python 3.9.13 | packaged by conda-forge | (main, May 27 2022, 17:00:33)
[Clang 13.0.1 ] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
Traceback (most recent call last):
File "__init__.pxd", line 942, in numpy.import_array
RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jremmert/miniforge3/lib/python3.9/site-packages/pandas/__init__.py", line 29, in <module>
from pandas._libs import hashtable as _hashtable, lib as _lib, tslib as _tslib
File "/Users/jremmert/miniforge3/lib/python3.9/site-packages/pandas/_libs/__init__.py", line 13, in <module>
from pandas._libs.interval import Interval
File "pandas/_libs/interval.pyx", line 1, in init pandas._libs.interval
File "pandas/_libs/hashtable.pyx", line 1, in init pandas._libs.hashtable
File "pandas/_libs/missing.pyx", line 1, in init pandas._libs.missing
File "/Users/jremmert/miniforge3/lib/python3.9/site-packages/pandas/_libs/tslibs/__init__.py", line 30, in <module>
from .conversion import OutOfBoundsTimedelta, localize_pydatetime
File "pandas/_libs/tslibs/conversion.pyx", line 1, in init pandas._libs.tslibs.conversion
File "pandas/_libs/tslibs/nattype.pyx", line 30, in init pandas._libs.tslibs.nattype
File "__init__.pxd", line 944, in numpy.import_array
ImportError: numpy.core.multiarray failed to import
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/jremmert/miniforge3/lib/python3.9/site-packages/pandas/__init__.py", line 33, in <module>
raise ImportError(
ImportError: C extension: numpy.core.multiarray failed to import not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --force' to build the C extensions first.
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'
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