Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
230 views
in Technique[技术] by (71.8m points)

python - Installed module using pip, not found

I am trying to install a package called "simpleguitk" via pip. (On Ubuntu 16.04 with Python 3.5)
After running

sudo -H pip3 install simpleguitk

it says installation is completed successfully. (Except for the pygame dependecy which is actually optional)

Collecting simpleguitk
Using cached SimpleGUITk-1.1.3.tar.gz
Collecting Pillow>=2.0.0 (from simpleguitk)
Using cached Pillow-3.4.2-cp35-cp35m-manylinux1_x86_64.whl
Collecting pygame>=1.9.0 (from simpleguitk)
Could not find a version that satisfies the requirement pygame>=1.9.0 (from simpleguitk) (from versions: 1.9.2.dev1, 1.9.2b7, 1.9.2b8)
No matching distribution found for pygame>=1.9.0 (from simpleguitk)

I cannot find the package at /usr/local/lib/python3.5/dist-packages or /usr/lib/python3.5 or /usr/lib/python3

When I try to import the module it says:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'simpleguitk'

I tried to reinstall it, but running:

sudo -H pip3 uninstall simpleguitk

returns: "Cannot uninstall requirement simpleguitk, not installed "

I have tried this on both pip 8.1.2 and pip 9.0.1 with the same results. I have even reinstalled Ubuntu, but still the same.

I think Python Path is wrong as it does not have python 3.5 but I do not know how to fix it

['', '/usr/lib/python2.7', '/usr/lib/python2.7/plat-x86_64-linux-gnu', '/usr/lib/python2.7/lib-tk', '/usr/lib/python2.7/lib-old', '/usr/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages', '/usr/lib/python2.7/dist-packages/gtk-2.0']
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

Make sure you're installing it for the version of python you're using, with

/path/to/your/python -m pip install <package>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...