Python No Module Name Pika When Importing Pika
Solution 1:
More likely you are running several versions of pip and python. Check your 'pip' and 'python' versions - you should use a 'pip' version corresponding to your 'python' version:
# python --version
Python 2.7.5
# pip --version
pip 9.0.1 from /usr/lib/python3.4/site-packages/pip-9.0.1-py3.4.egg (python 3.4)
As you can see 'pip' will install modules for a python version different from the one I'm using. I used 'pip2' command for 'python2' (use pip3 for python3):
# pip2 install pika
Solution 2:
git clone https://github.com/pika/pika.git
cd pika
python setup.py install
Installs pika 1.0.1b with 2.7
or
apt install python3
apt install python3-pip
pip3 install pika
Solution 3:
You can add that export command to your ~/.bash_login file.
Solution 4:
Go to Scripts in your python folder and drag and drop pip.exe on command prompt and type install pika.
eg- C:\Python27\Scripts\pip.exe install pika
Solution 5:
I ran in to this problem in Windows. Package was installed successfully but python show me that error.
First of all I uninstall the package using cmd command pip3 uninstall moduleName
.
Then based on python documentation I run command python -m pip install moduleName
and my problem solved!
Here is the documentation: Installing Python Modules
Post a Comment for "Python No Module Name Pika When Importing Pika"