ModuleNotFoundError: No module named 'pip._internal.cli.main' - python-3.x

Hey Guys i just want to share this with you in case you get the same error :
pip3 -V
Traceback (most recent call last):
File "/Users/$(whoami)/Library/Python/3.7/bin/pip3", line 5, in <module>
from pip._internal.cli.main import main
ModuleNotFoundError: No module named 'pip._internal.cli.main'

I've just solved this problem by updating pip. Like this:
python -m pip install --upgrade pip --user

Solution :
remove all python folders, and reference found here :
/usr/local/bin/
/usr/local/lib
/usr/local/Cellar/
/Users/$(whoami)/Library/Python/
/Library/Frameworks/Python.framework/Versions/ (Only if it exists !! for me it doesnt)
Then run :
brew install python3

Related

Python3 / pip3 module not found

Whenever I try to run the following commands:
pip3 -v
pip3 install <module>
python3 -m pip install <module>
I get the error "ModuleNotFoundError: no module named random" with the traceback referencing a file in /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/emailutils.py
Any ideas?

Anaconda Terminal error pywin32_bootstrap

I got this error in my Anaconda Navigator base Terminal:
Traceback (most recent call last):
File "C:\Users\myusername\AppData\Local\Continuum\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
How can i fix this?
I got the same error during pip install, and I solved it by installing build 225 of pywin32 instead of the latest version:
pip install pywin32==225
I followed soberWolf's suggestion, but needed to add the --user switch as the permissions seem a little off, so pip install --ignore-installed pywin32 --user
try pip install --ignore-installed pywin32 to reinstall pywin32
quote: How to fix 'ImportError: DLL load failed while importing win32api'

python3 "ModuleNotFoundError: No module named 'OpenGL'"

I am running python3. I've installed OpenGL (pip install OpenGL PyOpenGL_accelerate). When I run my program (python3 opengltest1.py) I get this error:
Traceback (most recent call last):
File "opengltest1.py", line 4, in <module>
from OpenGL.GL import *
The solution was to install OpenGL with pip3 instead of pip, i.e.
pip3 install pyopengl
#eyllanesc Thanks for the help. In following up on your suggestion, I found the solution.
This worked for me! You must download every package with pip3. All things are separated because the syntax is different from Python 2 to Python 3.

No module named 'info' on fresh Python 3 installation

I did a fresh python3 installation on OSX via homebrew:
brew install python3
Then I created a virtual environment for my project and installed scipy and scikits.samplerate:
virtualenv -p /usr/local/bin/python3 pythen_env
pip install scipy
pip install scikits.samplerate
However, when I try to import a function from scikits.samplerate, I get the following error:
>>> from scikits.samplerate import resample
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/my/project/path/pythen_env/lib/python3.6/site-packages/scikits/samplerate/__init__.py", line 4, in <module>
from info import __doc__
ModuleNotFoundError: No module named 'info'
Info happens to be the first module from the package itself that is imported in __init__.py.
Strangely, the module info.py exists in /my/project/path/pythen_env/lib/python3.6/site-packages/scikits/samplerate/:
ls /my/project/path/pythen_env/lib/python3.6/site-packages/scikits/samplerate/
__init__.py setup.py tests __pycache__
info.py setuphelp.py version.py
The error also happens when I try the same without virtualenv, as well as for other packages. How could I start to debug this issue?
The problem seems to be that the package scikits.samplerate does not support Python 3.X (see issue). However, there is a fork which supports Python 3.X. You can install it via
$ pip install git+https://github.com/gregorias/samplerate.git
As always: people can make anything they like in repositories. I did not check which changes gregorias made.
the git version does support py3
https://github.com/cournape/samplerate
(merged the PR from #gregorias)
I should find the time and procedure to update pypi too...

ImportError: No module named 'PyQt5.QtQuick'

I have installed PyQt5 in my Ubuntu 14.04.04 LTS by using the following command:
sudo apt-get install python3-pyqt5
But when I run the following statement in python IDLE, I got errors. How to solve it?
>>> from PyQt5.QtQuick import QQuickView, QQuickItem
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'PyQt5.QtQuick'
For this kind of error I have found a solution from the above comment. Just install relevant package with apt-get:
sudo apt-get install python3-pyqt5.qtquick

Resources