ModuleNotFoundError: No module named '_distutils_hack' - python

Someone could help me, please? I was running some python scripts and I found the following warning:
Traceback (most recent call last):
File "/Users/yohelcruz/opt/anaconda3/lib/python3.9/site.py", line 169, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named '_distutils_hack'
Remainder of file ignored```

I ended up creating an issue on conda: https://github.com/conda/conda/issues/11931
After some additional digging, I found that running
pip install -U pip setuptools
solved the issue

Related

ModuleNotFoundError: No module named 'nvidia.dali.backend_impl' when running nvidia/deeplearningexamples reponstory

run rn50 scripts in NVIDIA/DeepLearningExamples, as
./rn50_partial.sh
get error like this:
Traceback (most recent call last):
File "/export/nfs/sunxue/DeepLearningExamples/PyTorch/Classification/ConvNets/mnasnet/training/FP32/../../../launch.py", line 7, in <module>
from main import main, add_parser_arguments, available_models
File "/export/nfs/sunxue/DeepLearningExamples/PyTorch/Classification/ConvNets/main.py", line 49, in <module>
from image_classification.dataloaders import *
File "/export/nfs/sunxue/DeepLearningExamples/PyTorch/Classification/ConvNets/image_classification/dataloaders.py", line 79, in <module>
class HybridTrainPipe(Pipeline):
NameError: name 'Pipeline' is not defined
ok, I've solved this, cause NVIDIA does not classify the specific installation, actually, it does not have to install from scratch, if you use pip install, just check which version NVIDIA docker use and download this specific version, pip install, and everything will be ok.

Problems with installing packages with Anaconda

I tried installing pandas_datareader in Anaconda using conda install -c anaconda pandas-datareader. It gives me this result:
Traceback (most recent call last):
File "C:\Users\Peter\Anaconda3\lib\site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pywin32_bootstrap'
Remainder of file ignored
Error processing line 7 of C:\Users\Peter\Anaconda3\lib\site-packages\pywin32.pth:
Traceback (most recent call last):
File "C:\Users\Peter\Anaconda3\lib\site.py", line 168, in addpackage
exec(line)
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'pywin32_bootstrap'
Remainder of file ignored
Okay, bad luck I thought, and I tried installing something else (plotly). And this gave me exactly the same result.
Try:
conda remove [-c anaconda] pywin32
conda install -c anaconda pywin32
Code in brakets is not necessary.
This should reinstall pywin32. And go for another try. It worked for me using pip.

import error when trying to use pip command in ubuntu terminal

I just installed pip with ubuntu onto my laptop. Whenever I try to use pip in the terminal, I keep getting this error:
lopuj#lopuj-Dell-System-XPS-L502X:~$ pip
Traceback (most recent call last):
File "/usr/local/bin/pip", line 9, in <module>
load_entry_point('pip==1.4.1', 'console_scripts', 'pip')()
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 357, in load_entry_point
def get_entry_info(dist, group, name):
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 2394, in load_entry_point
break
File "/usr/local/lib/python3.4/dist-packages/setuptools-1.1.5-py3.4.egg/pkg_resources.py", line 2108, in load
name = some.module:some.attr [extra1,extra2]
ImportError: No module named 'pip'
lopuj#lopuj-Dell-System-XPS-L502X:~$ ^C
lopuj#lopuj-Dell-System-XPS-L502X:~$
How can I stop this from happening so i can just type in commands like 'pip install Django==1.7.1'?
Your referencing
usr/local
but pip is installed at
usr/lib
Check your installation. I would reinstall using esay_install and then open/close terminal.

Pip on Mac OS X ImportError: cannot import name walk_packages

I have found several pip problems on stack overflow, but unfortunately it seems like I am experiencing some that I can't find.
Particularly I am getting following error message whenever I try to use pip:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/bin/pip", line 9, in <module>
load_entry_point('pip==1.3.1', 'console_scripts', 'pip')()
File "build/bdist.macosx-10.5-intel/egg/pkg_resources.py", line 357, in load_entry_point
"""Yield named metadata resource as list of non-blank non-comment lines
File "build/bdist.macosx-10.5-intel/egg/pkg_resources.py", line 2394, in load_entry_point
except ValueError:
File "build/bdist.macosx-10.5-intel/egg/pkg_resources.py", line 2108, in load
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/__init__.py", line 10, in <module>
from pip.backwardcompat import u, walk_packages, console_to_str
ImportError: cannot import name walk_packages
Does anyone have any idea what can be wrong?
Until now I have tried to reinstall pip as it was recommended here: Python mechanize module not found and I have also tried this Pip using system python osx, but non of them works for me.
Thank you in advance for any advices.
Somehow solved by command sudo easy_install -U pip

error on installing pywin32 for python 2.6 on winXP

I get the following error at the end of installing pywin32-216.win32-py2.6.exe for python-2.6.msi for WinXP.
Traceback (most recent call last):
File "<string>", line 604, in <module>
File "<string>", line 314, in install
File "<string>", line 152, in LoadSystemModule
ImportError: DLL load failed: The specified module could not be found
Screenshot: https://picasaweb.google.com/lh/photo/mvQziLhUnX8DN8otUhaJSg?feat=directlink
I tried the advice in Post-install errors while installing pywin32-216 on Windows XP and it did not work. How can I resolve this error?
As Ignacio suggested
here you should run
Dependency Walker to understand what's amiss.

Categories

Resources