尝试psycopg2通过Pip在Mavericks 10.9上安装时出现以下错误:
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
Run Code Online (Sandbox Code Playgroud)
不确定如何继续并在此处和其他地方搜索此特定错误.任何帮助深表感谢!
以下是pip的完整输出:
$ pip install psycopg2
Downloading/unpacking psycopg2
Downloading psycopg2-2.5.2.tar.gz (685kB): 685kB downloaded
Running setup.py (path:/private/var/folders/0z/ljjwsjmn4v9_zwm81vhxj69m0000gn/T/pip_build_tino/psycopg2/setup.py) egg_info for package psycopg2
Installing collected packages: psycopg2
Running setup.py install for psycopg2
building 'psycopg2._psycopg' extension
cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing -fwrapv -mno-fused-madd -DENABLE_DTRACE -DMACOSX -DNDEBUG -Wall -Wstrict-prototypes -Wshorten-64-to-32 -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch x86_64 -arch i386 -pipe -DPSYCOPG_DEFAULT_PYDATETIME=1 -DPSYCOPG_VERSION="2.5.2 (dt dec pq3 …Run Code Online (Sandbox Code Playgroud) 这是我的错误:
(mysite)zjm1126@zjm1126-G41MT-S2:~/zjm_test/mysite$ pip install lxml
Downloading/unpacking lxml
Running setup.py egg_info for package lxml
Building lxml version 2.3.
Building without Cython.
ERROR: /bin/sh: xslt-config: not found
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
Installing collected packages: lxml
Running setup.py install for lxml
Building lxml version 2.3.
Building without Cython.
ERROR: /bin/sh: xslt-config: not found
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration …Run Code Online (Sandbox Code Playgroud) 我正在运行以下命令,以便在该文件" pip install -r requirements.txt --download-cache=~/tmp/pip-cache"中安装软件包
.
requirement.txt包含像pacakages
# Data formats
# ------------
PIL==1.1.7 #
html5lib==0.90
httplib2==0.7.4
lxml==2.3.1
# Documentation
# -------------
Sphinx==1.1
docutils==0.8.1
# Testing
# -------
behave==1.1.0
dingus==0.3.2
django-testscenarios==0.7.2
mechanize==0.2.5
mock==0.7.2
testscenarios==0.2
testtools==0.9.14
wsgi_intercept==0.5.1
Run Code Online (Sandbox Code Playgroud)
当我想要安装"lxml"软件包时,我得到了以下的错误
Requirement already satisfied (use --upgrade to upgrade): django-testproject>=0.1.1 in /usr/lib/python2.7/site-packages/django_testproject-0.1.1-py2.7.egg (from django-testscenarios==0.7.2->-r requirements.txt (line 33))
Installing collected packages: lxml, Sphinx, docutils, behave, dingus, mock, testscenarios, testtools, South
Running setup.py install for lxml
Building lxml version 2.3.1.
Building without Cython.
ERROR: /bin/sh: xslt-config: …Run Code Online (Sandbox Code Playgroud) 我配置了MinGW和distutils所以现在我可以使用这个命令编译扩展:
setup.py install
Run Code Online (Sandbox Code Playgroud)
将使用MinGW的gcc编译器并安装包.为此,我安装了MinGW并创建了distutils.cfg文件,其中包含以下内容:
[build]
compiler = mingw32
Run Code Online (Sandbox Code Playgroud)
这很酷,但现在我想使用所有的点数好处.有没有办法在pip中使用相同的MinGW的gcc编译器?这样当我运行时:
pip install <package name>
Run Code Online (Sandbox Code Playgroud)
如果需要,pip将使用MinGW的gcc编译器并编译C代码?
目前我收到此错误:Unable to find vcvarsall.bat.似乎pip并不知道我有gcc编译器.如何配置pip使用gcc编译器?