I'm new learner. I installed openpyxl module. And I have it in my directory. But when I want to use it I get error :
"ModuleNotFoundError: No module named 'openpyxl'"
any help?
This type of errors (ModuleNotFoundError) is usually caused due to various versions of Python being installed on your system. If you have both Python 2 and 3 installed, use pip2 or pip3 to install your module.
pip2 install openpyxl # for python2
pip3 install openpyxl # for python3
Related
I've installed appium on my system and use:
from appium import webdriver
by python3.6.
but in other code when I use it by python3.8 return me:
ModuleNotFoundError: No module named 'appium'
what's the problem with this error?!
The basic crux of the problem is that those 2 python versions are not accessing the same location of installed pip modules. Try using the python -m pip install SomePackage method to call pip of specific Python Binary.
This snippet will help.
python38 -m pip install Appium-Python-Client
Not sure, how you manage those versions of python, but the basic gist of invoking specific pip version works.
Try whereis pip or which pip to ensure the correct pip is being called.
I am writing a program in Python, But I got an error
ModuleNotFoundError: No module named 'pyaudio'
Then I tried
pipwin install pyaudio
It came out
Requirement already satisfied: PyAudio==0.2.11 from file:///C:/Users/JIE_0305/pipwin/PyAudio-0.2.11-cp37-cp37m-win_amd64.whl
but I run the program again, it still
ModuleNotFoundError: No module named 'pyaudio'
How can I solve the problem?
You could download the whl file and call it when installing, this might work, according to this post. In the post, you have the links to the site where you can download the whl file.
It is also stated that it might work with Python 3.6 and not 3.7, try changing your Python version to 3.6, if the other options give not result.
Another solution is uninstalling pyaudio, then connecting to your virtual environement and install again withing your venv. It might solve your problem.
Sometimes it happens that a library successfully installed might be related to a Python version which is different than the one you used when running the program. You should check this also, I mean check to which Python version the pyaudio library is related. Use the same Python version in order to run the program.
Try refreshing first with
pipwin refresh
If not use pip instead
pip install pyaudio --> python2
pip3 install pyaudio --> python3
Please try to use the pip command instead.
python3 -m pip install pyaudio # for python 3
or
python -m pip install pyaudio # for python 2 or lower
I am getting the below error even after doing a python setup.py install for xlwt.
ImportError: No Module named xlwt
I have tried installing using python wheel
pip3 install xlwt-1.3.0-py2.py3-none-any.whl
and I have also tried easy_installer, however the error is still there
What might be the issue?
I am using a windows 7 environment.
Command instruction to install xlwt:
pip install xlwt
I am totally confused on the relation between pip and python versions. I am using ubuntu 15.10
I gave locate /usr/bin/pip I have got the following response.
/usr/bin/pip
/usr/bin/pip2
/usr/bin/pip3
I installed pyLDAvis module using- pip install pyldavis
But I never see pyldavis module in pip list and when I say import pyLDAvis it throws me error saying no module named pyLDAvis
After spending much time I have found this module in pip2 list.
When I installed it using pip why did it install for python2.7 and
why it's located in pip2 list and why not in pip list?
If we have only 2 python versions- python 2.x(pip2) and python
3.x(pip3) what's all this confusion with three executables for python and pip each- python, python2.7, python3.5 and pip, pip2, pip3? Please provide any background information and the main reason for this.
My existing python scripts are unable to run because the module is accessible by python2.7 and not by python Do I now need to point(using symbolic link) python to python2.7 ? If yes do I need to install all the modules that I have installed using pip again with pip2 so that pip2 list
has all the modules that were there for pip list earlier?
I'm not experienced in Python, and I need the requests module.
I've tried installing it using pip install requests
The installation went successfully, but when I try to import the module, I get an error like "no module named requests".
Should I add the install location to PYTHONPATH? If yes, how can I find the location where pip installed the files? I don't know about virtualenv, and I am using Ubuntu.
You should install pip for python3 first
How to install pip with Python 3?
then with the pip-3.X install the required module.