So I'm trying to setup a project on my new work computer and I'm running into issues I never had on my personal computer. I'm trying to pip install from the requirements.txt file. I've got GCC, Xcode, command line tools, python, pip all installed but I still get the following when running pip install -r requirements.txt
from within the env:
所以我正在尝试在我的新工作电脑上建立一个项目,我遇到了我个人电脑上从来没有遇到过的问题。我正在尝试从需求中进行pip安装。txt文件。我有GCC, Xcode,命令行工具,python, pip都安装了,但是在运行pip安装-r需求时,我仍然得到了下面的内容。来自env的txt:
Requirement already satisfied (use --upgrade to upgrade): Django==1.9.7 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 1))
Requirement already satisfied (use --upgrade to upgrade): psycopg2==2.6.1 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 2))
Requirement already satisfied (use --upgrade to upgrade): Pillow==3.1.1 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 3))
Requirement already satisfied (use --upgrade to upgrade): django-bootstrap3==5.4.0 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 4))
Requirement already satisfied (use --upgrade to upgrade): easy-thumbnails==2.2 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 5))
Requirement already satisfied (use --upgrade to upgrade): lxml==3.4.4 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 6))
Requirement already satisfied (use --upgrade to upgrade): cssselect==0.9.1 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 7))
Requirement already satisfied (use --upgrade to upgrade): requests==2.8.0 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 8))
Requirement already satisfied (use --upgrade to upgrade): django-taggit==0.18.1 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 9))
Requirement already satisfied (use --upgrade to upgrade): django-storages==1.1.8 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 10))
Requirement already satisfied (use --upgrade to upgrade): boto==2.39.0 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 11))
Requirement already satisfied (use --upgrade to upgrade): django-smtp-ssl==1.0 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 12))
Requirement already satisfied (use --upgrade to upgrade): Wand==0.4.1 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 13))
Requirement already satisfied (use --upgrade to upgrade): pytz==2015.7 in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 14))
Requirement already satisfied (use --upgrade to upgrade): newrelic in ./env/lib/python2.7/site-packages (from -r requirements.txt (line 15))
Collecting uwsgi==2.0.12 (from -r requirements.txt (line 16))
Using cached uwsgi-2.0.12.tar.gz
Collecting django-pipeline==1.6.8 (from -r requirements.txt (line 17))
Using cached django_pipeline-1.6.8-py2.py3-none-any.whl
Collecting django-pipeline-compass-rubygem==0.1.9 (from -r requirements.txt (line 18))
Collecting jsmin==2.2.1 (from -r requirements.txt (line 19))
Collecting django-admin-sortable==2.0.18 (from -r requirements.txt (line 20))
Collecting feedparser==5.2.1 (from -r requirements.txt (line 21))
Collecting beautifulsoup4==4.5.1 (from -r requirements.txt (line 22))
Using cached beautifulsoup4-4.5.1-py2-none-any.whl
Building wheels for collected packages: uwsgi
Running setup.py bdist_wheel for uwsgi ... error
Complete output from command /Users/nathomer/Documents/code/meural/myMeural/env/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/w_/jqnvb03x6bs9334qbx39d4y80000gn/T/pip-build-kcaA1Y/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/w_/jqnvb03x6bs9334qbx39d4y80000gn/T/tmp_EJI_qpip-wheel- --python-tag cp27:
running bdist_wheel
running build
running build_py
creating build
creating build/lib
copying uwsgidecorators.py -> build/lib
installing to build/bdist.macosx-10.6-intel/wheel
running install
using profile: buildconf/default.ini
detected include path: ['/usr/local/include', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include', '/usr/include', '/System/Library/Frameworks', '/Library/Frameworks']
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/w_/jqnvb03x6bs9334qbx39d4y80000gn/T/pip-build-kcaA1Y/uwsgi/setup.py", line 109, in <module>
distclass=uWSGIDistribution,
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/Users/nathomer/Documents/code/meural/myMeural/env/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 235, in run
self.run_command('install')
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
self.distribution.run_command(command)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/private/var/folders/w_/jqnvb03x6bs9334qbx39d4y80000gn/T/pip-build-kcaA1Y/uwsgi/setup.py", line 71, in run
conf = uc.uConf(get_profile())
File "uwsgiconfig.py", line 700, in __init__
raise Exception("you need a C compiler to build uWSGI")
Exception: you need a C compiler to build uWSGI
----------------------------------------
Failed building wheel for uwsgi
Running setup.py clean for uwsgi
Failed to build uwsgi
Installing collected packages: uwsgi, django-pipeline, django-pipeline-compass-rubygem, jsmin, django-admin-sortable, feedparser, beautifulsoup4
Running setup.py install for uwsgi ... error
Complete output from command /Users/nathomer/Documents/code/meural/myMeural/env/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/w_/jqnvb03x6bs9334qbx39d4y80000gn/T/pip-build-kcaA1Y/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/w_/jqnvb03x6bs9334qbx39d4y80000gn/T/pip-obbWpw-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/nathomer/Documents/code/meural/myMeural/env/bin/../include/site/python2.7/uwsgi:
running install
using profile: buildconf/default.ini
detected include path: ['/usr/local/include', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/8.0.0/include', '/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include', '/usr/include', '/System/Library/Frameworks', '/Library/Frameworks']
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/w_/jqnvb03x6bs9334qbx39d4y80000gn/T/pip-build-kcaA1Y/uwsgi/setup.py", line 109, in <module>
distclass=uWSGIDistribution,
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/private/var/folders/w_/jqnvb03x6bs9334qbx39d4y80000gn/T/pip-build-kcaA1Y/uwsgi/setup.py", line 71, in run
conf = uc.uConf(get_profile())
File "uwsgiconfig.py", line 700, in __init__
raise Exception("you need a C compiler to build uWSGI")
Exception: you need a C compiler to build uWSGI
----------------------------------------
Command "/Users/nathomer/Documents/code/meural/myMeural/env/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/w_/jqnvb03x6bs9334qbx39d4y80000gn/T/pip-build-kcaA1Y/uwsgi/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/w_/jqnvb03x6bs9334qbx39d4y80000gn/T/pip-obbWpw-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/nathomer/Documents/code/meural/myMeural/env/bin/../include/site/python2.7/uwsgi" failed with error code 1 in /private/var/folders/w_/jqnvb03x6bs9334qbx39d4y80000gn/T/pip-build-kcaA1Y/uwsgi/
What's the deal? What am I missing?
这笔交易是什么?我缺少什么?
2 个解决方案
#1
0
You should already have a C compiler installed. Try this:
您应该已经安装了C编译器。试试这个:
export CC=gcc && pip install -r requirements.txt
源
#2
0
it is unclear which XCode is used, i ran into similar problems with XCode 8, and solved it by installing XCode7 into /Applications and then
不清楚使用的是哪个XCode,我在XCode 8上遇到了类似的问题,然后通过在/应用程序中安装XCode7解决了这个问题
sudo xcode-select -s /Applications/Xcode7.app/Contents/Developer/
sudo xcode-select - s /应用程序/ Xcode7.app /内容/开发/
pip install uwsgi
went smoothly ...
pip安装uwsgigo进展顺利……
#1
0
You should already have a C compiler installed. Try this:
您应该已经安装了C编译器。试试这个:
export CC=gcc && pip install -r requirements.txt
源
#2
0
it is unclear which XCode is used, i ran into similar problems with XCode 8, and solved it by installing XCode7 into /Applications and then
不清楚使用的是哪个XCode,我在XCode 8上遇到了类似的问题,然后通过在/应用程序中安装XCode7解决了这个问题
sudo xcode-select -s /Applications/Xcode7.app/Contents/Developer/
sudo xcode-select - s /应用程序/ Xcode7.app /内容/开发/
pip install uwsgi
went smoothly ...
pip安装uwsgigo进展顺利……