macos 无法安装pymssql
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10098507/
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
Unable to install pymssql
提问by Manish
I was trying to install pymssql .For this I use pip and installed it using a virtual environment according to instructions mentioned hereBut when I say
我试图安装 pymssql 。为此,我使用 pip 并根据此处提到的说明使用虚拟环境安装它但是当我说
(my_new_env)tmp> pip install pymssql
(my_new_env)tmp> pip install pymssql
I see the following errors :
我看到以下错误:
Downloading pymssql-2.0.0b1-dev-20111019.tar.gz (5.0Mb): 5.0Mb downloaded Running setup.py egg_info for package pymssql
Traceback (most recent call last): File "", line 14, in File "/private/tmp/my_new_env/build/pymssql/setup.py", line 41, in from Cython.Distutils import build_ext as _build_ext ImportError: No module named Cython.Distutils Complete output from command python setup.py egg_info: Traceback (most recent call last):File "", line 14, in
File "/private/tmp/my_new_env/build/pymssql/setup.py", line 41, in
from Cython.Distutils import build_ext as _build_ext
ImportError: No module named Cython.Distutils
下载 pymssql-2.0.0b1-dev-20111019.tar.gz (5.0Mb): 5.0Mb 下载运行 setup.py egg_info 包 pymssql
Traceback (最近一次调用最后一次): File "", line 14, in File "/private /tmp/my_new_env/build/pymssql/setup.py", line 41, in from Cython.Distutils import build_ext as _build_ext ImportError: No module named Cython.Distutils Complete output from command python setup.py egg_info: Traceback (last last call last ):文件“”,第 14 行,在
文件“/private/tmp/my_new_env/build/pymssql/setup.py”,第 41 行,在
从 Cython.Distutils 导入 build_ext 作为 _build_ext
导入错误:没有名为 Cython.Distutils 的模块
I googled a bit for this issue.Do I have to install Cython or something? If so some instructions in this direction would be helpful. Thanks!
我用谷歌搜索了一下这个问题。我必须安装 Cython 还是什么?如果是这样,在这个方向上的一些说明会有所帮助。谢谢!
回答by joshcartme
You need to install Cython. It is available on PyPi so you may be able to do:
您需要安装 Cython。它在 PyPi 上可用,因此您可以执行以下操作:
pip install cython
That may not work on windows (I really don't know), but if it doesn't check out this page: http://cython.org/#download
这可能不适用于 Windows(我真的不知道),但如果它不查看此页面:http: //cython.org/#download
On that page you will see a link to windows installers. Pick the right one and you should be good to go.
在该页面上,您将看到 Windows 安装程序的链接。选择正确的一个,你应该很高兴。