我已经卸载并安装了Homebrew 3次,因为它似乎永远不允许我安装任何东西,因为它在大多数安装结束时拒绝我的权限.
作为一个例子,我将发布我目前面临的这个libjpeg下载场景.
我尝试安装libjpeg并获取:
$ brew install libjpeg
==> Downloading https://downloads.sf.net/project/machomebrew/Bottles/jpeg-8d.mountain_lion.bottle.1.tar.gz
Already downloaded: /Library/Caches/Homebrew/jpeg-8d.mountain_lion.bottle.1.tar.gz
==> Pouring jpeg-8d.mountain_lion.bottle.1.tar.gz
Warning: Could not link jpeg. Unlinking...
Error: The brew link step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link jpeg'
Error: Permission denied - /usr/local/opt/jpeg
Run Code Online (Sandbox Code Playgroud)
'brew link jpeg'导致
Error: Permission denied - /usr/local/opt/jpeg
Run Code Online (Sandbox Code Playgroud)
这是我的酿酒医生所读的内容
$ brew doctor
Warning: "config" scripts exist outside your system or Homebrew directories.
./configure scripts often look …
Run Code Online (Sandbox Code Playgroud) 我正在运行Ubuntu 11.04,Python 2.7.1并想安装Pyaudio.所以我跑了,
$ sudo easy_install pyaudio
在终端和进程退出时出现以下错误消息,
Searching for pyaudio Reading http://pypi.python.org/simple/pyaudio/ Reading http://people.csail.mit.edu/hubert/pyaudio/ Best match: pyaudio 0.2.4 Downloading http://people.csail.mit.edu/hubert/pyaudio/packages/pyaudio-0.2.4.tar.gz Processing pyaudio-0.2.4.tar.gz Running PyAudio-0.2.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-0Tetss/PyAudio-0.2.4/egg-dist-tmp-PYy9T8 In file included from /usr/include/python2.7/Python.h:8:0, from src/_portaudiomodule.c:30: /usr/include/python2.7/pyconfig.h:1155:0: warning: "_POSIX_C_SOURCE" redefined /usr/include/features.h:214:0: note: this is the location of the previous definition src/_portaudiomodule.c:31:23: fatal error: portaudio.h: No such file or directory compilation terminated. error: Setup script exited with error: command 'gcc' failed with exit status 1
我不确定是要在askubuntu.com上发布这个,还是在stackoveflow中发布,但无论如何它都在stackoverflow中.另外我google了一下这个问题,通过安装python-dev找到了解决了一些问题.我已经安装了python-dev.可能出了什么问题?
UPDATE
以下是安装libportaudio-dev后出现的新错误,
Searching for pyaudio …
我正在使用mac osx 10.10正如PyAudio主页所说,我使用了安装PyAudio
brew install portaudio
pip install pyaudio
Run Code Online (Sandbox Code Playgroud)
portaudio的安装似乎很成功,我可以在/ usr/local/include和/ usr/local/lib中找到头文件和库,但是当我尝试安装pyaudio时,它会给我一个错误
src/_portaudiomodule.c:29:10: fatal error: 'portaudio.h' file not found
#include "portaudio.h"
^
1 error generated.
error: command 'cc' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
实际上它在/ usr/local/include中为什么找不到该文件?类似问题的一些答案对我不起作用(比如使用virtualenv,或者手动编译),我想找到一种简单的方法来解决这个问题.
我在尝试安装 PyAudio 时收到此错误:
ERROR: Could not build wheels for pyaudio, which is required to install pyproject.toml-based projects
Run Code Online (Sandbox Code Playgroud)
有谁知道为什么会发生这种情况以及如何解决?
最好的
我在两台服务器上工作,在一台服务器上.pydistutils.cfg看起来像:
install_scripts=~/opt_old/bin
install_data=~/opt_old/share
install_lib=~/usr/lib/python2.6/site-packages
Run Code Online (Sandbox Code Playgroud)
我认为,这会在本地版本的python上使用pip和链接库时出现问题.
在第二台服务器上,该文件不存在,我没有任何问题.
为什么我们需要这个文件,为什么PYTHONPATH不够用?
我安装了本地版本的Python并重命名了.pydistutils.cfg文件.因此,似乎该文件并不重要.