我在哪里获得python脚本的pymssql

时间:2012-04-05 00:52:30

标签: python macos

我正在尝试使用以下命令运行python脚本: -

python scriptname.py“someoptions”

当我这样做时会抛出一个错误

Traceback (most recent call last):
  File "scriptname.py", line 7, in <module>
    import pymssql
ImportError: No module named pymssql

我在mac.Can有人告诉我如何获得这个包?我需要把它放在哪里?

这是pip显示的错误: -

> 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 "<string>", line 14, in <module>
>      File "/private/tmp/my_new_env/build/pymssql/setup.py", line 41, in <module>
>        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 "<string>", line 14, in <module>
> 
>  File "/private/tmp/my_new_env/build/pymssql/setup.py", line 41, in
> <module>
> 
>    from Cython.Distutils import build_ext as _build_ext
> 
> ImportError: No module named Cython.Distutils

1 个答案:

答案 0 :(得分:2)

http://code.google.com/p/pymssql/

安装它的最简单方法可能是pip(或较旧的easy_install)。