pip3
无法安装Image
模块,因此我遵循了另一个过程,但Python无法导入模块。这就是我所做的:
C:\Users\myuser>pip3 install --user Image
Fatal error in launcher: Unable to create process using '"'
C:\Users\myuser>python3
Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 08:06:12) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip
>>> pip.main(['install','--user','Image'])
Collecting Image
Using cached image-1.5.5.tar.gz
Collecting pillow (from Image)
Downloading Pillow-4.0.0-cp36-cp36m-win_amd64.whl (1.5MB)
100% |████████████████████████████████| 1.5MB 323kB/s
Collecting django (from Image)
Using cached Django-1.10.6-py2.py3-none-any.whl
Collecting olefile (from pillow->Image)
Using cached olefile-0.44.zip
Installing collected packages: olefile, pillow, django, Image
Running setup.py install for olefile ... done
Running setup.py install for Image ... done
Successfully installed Image-1.5.5 django-1.10.6 olefile-0.44 pillow-4.0.0
0
>>> import Image
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'Image'
>>>
答案 0 :(得分:1)
尝试
import image
代替。
这里的问题是包的名称并不总是与它在python中导入的名称相对应。
答案 1 :(得分:0)
我跑步:
python3.4 -m pyinstaller labelme.spec
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'pyinstaller'
我使用:
pip3 list
找到已安装的模块名称:PyInstaller 所以最后:
python3 -m PyInstaller labelme.spec