我試圖在virtualenv中的mac os 10.12上使用pip在python 2.7.10中安裝mod_wsgi。我打算在Django 1.10.3中使用它。 當我運行「PIP安裝mod_wsgi的」我得到以下輸出:pip install mod_wsgi在virtualenv中失敗
Collecting mod_wsgi
Using cached mod_wsgi-4.5.7.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/sf/kdqqs98d06326180mss7hggh0000gn/T/pip-build-hgA7s1/mod-wsgi/setup.py", line 247, in <module>
APR_INCLUDES = get_apr_includes().split()
File "/private/var/folders/sf/kdqqs98d06326180mss7hggh0000gn/T/pip-build-hgA7s1/mod-wsgi/setup.py", line 219, in get_apr_includes
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/sf/kdqqs98d06326180mss7hggh0000gn/T/pip-build-hgA7s1/mod-wsgi/
我是新來VIRTUALENV所以它可能是我只是缺少與如何設置了一些東西。我試過升級pip,通過pip重新安裝setuptools和ez_setup。
您是否安裝了Xcode命令行工具? ''xcode-select --install''表示它們在運行時被安裝嗎? –
運行該命令提示我運行安裝。我繼續安裝命令行工具。儘管在運行pip install mod_wsgi時,我仍然遇到同樣的問題。 –
程序「/ usr/sbin/apxs」存在嗎?你可以在你係統的任何地方找到''apxs''嗎?可以使用''find/-name apxs''。 Apple在每次新的主要操作系統更新時都會中斷Apache模塊和mod_wsgi的安裝,並且這次看起來他們沒有在正常位置安裝「apxs」。 –