Python 导入错误:没有名为“Cython”的模块
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43982543/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ImportError: No module named 'Cython'
提问by Tais
I'm trying do from Cython.Build import cythonize
and I get the message ImportError: No module named 'Cython'
, but I instaled the Cython with the comand pip install Cython
. What's wrong?
我正在尝试执行from Cython.Build import cythonize
并收到消息ImportError: No module named 'Cython'
,但我使用命令安装了 Cython pip install Cython
。怎么了?
Python 3.5 Cython 0.25.2 Windows 8
Python 3.5 Cython 0.25.2 Windows 8
采纳答案by Tais
I reinstalled the Cython with conda and install the Microsoft Visual C++ Build Tools and it works fine.
我用 conda 重新安装了 Cython 并安装了 Microsoft Visual C++ Build Tools,它工作正常。
回答by Xiaoyu Xu
just directly install from pypi:
pip install Cython
https://pypi.org/project/Cython/
直接从pypi安装:https://pypi.org/project/Cython/
pip install Cython
回答by baraa yusri
Use Pip3 command:
使用 Pip3 命令:
pip3 install --upgrade cython
回答by Pranav balu
You can download the the newest Cython release from http://cython.org/or you can directly download by clicking this link hereUnpack the tarball or zip file, enter the directory, and then run:
您可以从以下网址下载最新的版本用Cython http://cython.org/或者您可以通过点击这个链接直接下载这里解压压缩包或zip文件,进入该目录,然后运行:
python setup.py install