简体   繁体   English

无法安装pymssql

[英]Unable to install pymssql

I was trying to install pymssql.For this I use pip and installed it using a virtual environment according to instructions mentioned here But when I say我正在尝试安装 pymssql。为此我使用 pip 并根据此处提到的说明使用虚拟环境安装它但是当我说

(my_new_env)tmp> pip install pymssql (my_new_env)tmp> pip 安装 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下载 pymssql-2.0.0b1-dev-20111019.tar.gz (5.0Mb):下载 5.0Mb 为 package pymssql 运行 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 Complete output from command python setup.py egg_info: Traceback (most recent call last):追溯(最近一次通话最后一次):文件“/private/tmp/my_new_env/build/pymssql/setup.py”中的第 14 行,第 41 行,来自 Cython.Distutils import build_ext as _build_ext ImportError:无模块名为 Cython.Distutils Complete output 来自命令 python setup.py egg_info: Traceback(最近调用最后):

File "", line 14, in文件“”,第 14 行,位于

File "/private/tmp/my_new_env/build/pymssql/setup.py", line 41, in文件“/private/tmp/my_new_env/build/pymssql/setup.py”,第 41 行,位于

from Cython.Distutils import build_ext as _build_ext从 Cython.Distutils 将 build_ext 导入为 _build_ext

ImportError: No module named Cython.Distutils导入错误:没有名为 Cython.Distutils 的模块

I googled a bit for this issue.Do I have to install Cython or something?我在谷歌上搜索了一下这个问题。我必须安装 Cython 还是什么? If so some instructions in this direction would be helpful.如果是这样,这方面的一些说明会有所帮助。 Thanks!谢谢!

You need to install Cython.您需要安装 Cython。 It is available on PyPi so you may be able to do:它在 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.在该页面上,您将看到指向 windows 安装程序的链接。 Pick the right one and you should be good to go.选择正确的一个,你应该对 go 很好。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM