虽然python3找不到Cython模块:
python3 setup.py
Could not import cx_Freeze. Building executable not possible.
Traceback (most recent call last):
File "setup.py", line 13, in <module>
from Cython.Build import cythonize
ImportError: No module named 'Cython'
pip3表示已经安装:
pip3 install Cython
Requirement already satisfied (use --upgrade to upgrade): Cython in /usr/local/lib/python3.4/dist-packages
Cleaning up...
发生了什么事?我该如何解决这个问题?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~
更多相关信息:
Pip版本:
pip3 -V
pip 1.5.4 from /usr/lib/python3/dist-packages (python 3.4)
Python版本:
python3 -V
Python 3.4.6
尝试从Python会话中安装:
python3
Python 3.4.6 (default, May 11 2017, 18:25:35)
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> import Cython
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'Cython'
>>> sys.executable
'/usr/local/bin/python3'
>>> exit()
python3 -m pip install module
/usr/local/bin/python3: No module named pip
python3 -m pip Cython
/usr/local/bin/python3: No module named pip
sudo apt-get install python3-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-pip is already the newest version.
The following packages were automatically installed and are no longer required:
libgsoap4 libvncserver0
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 189 not upgraded.
[编辑]
这个问题一团糟,我仍然不知道以前发生了什么。我已经放弃了尝试让Python工作,因为我发现一个应用程序与我试图运行的Python应用程序做同样的事情。这真是太痛苦了。