当我尝试使用pip升级我的matplotlib时,它输出: Downloading/unpacking matplotlib from https://pypi.python.org/packages/source/m/matplotlib/matplotlib-1.4.0.tar.gz#md5=1daf7f2123d94745feac1a30b210940c Downloading matplotlib-1.4.0.tar.gz (51.2MB): 51.2MB downloaded Running setup.py (path:/tmp/pip_build_root/matplotlib/setup.py) egg_info for package matplotlib ============================================================================ Edit setup.cfg to change the build options BUILDING MATPLOTLIB matplotlib: yes [1.4.0] python: yes [2.7.6 (default, Mar 22 2014, 22:59:38) [GCC 4.8.2]] platform: yes [linux2] REQUIRED DEPENDENCIES AND EXTENSIONS numpy: yes [version 1.8.2] six: yes [using six […]
我刚刚更新了我的Mac OS 10.9,我发现我的Python模块的一些(全部?)不在这里,特别是图像。 所以我试着执行sudo pip install pil ,但是我得到这个错误: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/tk.h:78:11: fatal error: 'X11/Xlib.h' file not found # include <X11/Xlib.h> ^ 1 error generated. error: command 'cc' failed with exit status 1 我的Xcode是最新的,我不知道。 PIL是否可以兼容10.9?
我一直在使用Mac python,而且我决定自学matplotlib ,因为我想用一些常用模块的经验。 我听到大家的意见,一旦你进入非标准模块,最好使用python扔自制软件,所以你有权访问pip而不是easy_install 。 运行后: $brew install python –with-brewed-openssl , $brew install python3 –with-brewed-openssl , $pip install matplotlib ,我用$python3去python shell。 一旦那里,我运行import matplotlib.pyplot as plt ,并得到以下内容: Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib.pyplot […]
所以我有这个小问题。 当我尝试安装PyGame for Python 3.4时,我下载了一个.whl(wheel?)文件,不知道如何使用它。 有些人告诉我一些关于点子,但不知道如何使用/安装它。
OS X(Mavericks)安装了Python 2.7的股票。 但是我用3.3来做所有我自己的Python东西。 我刚刚刷新我的3.3.2安装并安装了新的3.3.3。 所以我需要再次安装pyserial 。 我可以按照以前的方式来做到这一点,即: 从pypi下载pyserial untar pyserial.tgz CD pyserial python3 setup.py install 但我想要像酷小孩一样做,只是做一些像pip3 install pyserial 。 但是到目前为止我还不清楚。 就这一点而言。 对virtualenv没有兴趣(除非我必须)。
使用pip在virtualenv中安装软件包会导致将软件包安装在全局site-packages文件夹中,而不是在virtualenv文件夹中。 以下是我如何在OS X Mavericks(10.9.1)上设置Python3和virtualenv: 我使用Homebrew安装了python3: ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)" brew install python3 –with-brewed-openssl 更改.bash_profile中的$PATHvariables; 添加了以下行: export PATH=/usr/local/bin:$PATH 运行which python3返回/usr/local/bin/python3 (在重新启动shell之后)。 注意: which python3仍然返回/ usr/bin/python 。 使用pip3安装virtualenv: pip3 install virtualenv 接下来,创build一个新的virtualenv并激活它: virtualenv testpy3 -p python3 cd testpy3 source bin/activate 注意:如果我没有指定-p python3,则virtualenv中的bin文件夹中将缺lesspip。 运行which pip和which pip3都返回virtualenv文件夹: /Users/kristof/VirtualEnvs/testpy3/bin/pip3 现在,当我尝试在激活的virtualenv中使用pip安装例如Markdown时,pip将安装在全局site-packages文件夹中,而不是virtualenv的site-packages文件夹中。 pip install markdown 运行pip list返回: Markdown (2.3.1) pip (1.4.1) […]
我试图安装numpy(和scipy和matplotlib)到virturalenv。 我不断收到这些错误: RuntimeError: Broken toolchain: cannot link a simple C program —————————————- Cleaning up… Command python setup.py egg_info failed with error code 1 我有安装Xcode的命令行工具 $ which gcc /usr/bin/gcc $ which cc /usr/bin/cc 我在Mac OSX 10.9上使用brew安装的python 编辑 是的,试图用pip安装。 整个回溯是巨大的(> 400线) 这是它的一部分: C compiler: cc -fno-strict-aliasing -fno-common -dynamic -arch x86_64 -arch i386 -g -Os -pipe -fno-common -fno-strict-aliasing […]
在Windows 8上用Python 2.7使用pip install zipline给我错误: Downloading/unpacking six (from python-dateutil==2.1->delorean->zipline[all]) Running setup.py egg_info for package six Installing collected packages: blist, pytz, requests, python-dateutil, six Running setup.py install for blist building '_blist' extension error: Unable to find vcvarsall.bat Complete output from command C:\Python27\python.exe -c "import setuptools;__ file__='c:\\users\\ThatsMe\\appdata\\local\\temp\\pip-build-ThatsMe\\blist\\setup.py';ex ec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" inst all –record c:\users\ThatsMe\appdata\local\temp\pip-xvoky2-record\install-record.tx t –single-version-externally-managed: […]
我已经使用该命令安装了一个库 pip install git+git://github.com/mozilla/elasticutils.git 它直接从Github仓库安装它。 这工作正常,我想在我的requirements.txt有依赖。 我看过这样的其他门票,但这并没有解决我的问题。 如果我把类似的东西 -f git+git://github.com/mozilla/elasticutils.git elasticutils==0.7.dev 在requirements.txt文件中, pip install -r requirements.txt导致以下输出: Downloading/unpacking elasticutils==0.7.dev (from -r requirements.txt (line 20)) Could not find a version that satisfies the requirement elasticutils==0.7.dev (from -r requirements.txt (line 20)) (from versions: ) No distributions matching the version for elasticutils==0.7.dev (from -r requirements.txt (line 20)) 需求文件的文档没有提到使用git+git协议说明符的链接,所以也许这只是不被支持。 有没有人有我的问题的解决scheme?
我在安装psycopg2时遇到问题。 当我尝试pip install psycopg2时出现以下错误: Error: pg_config executable not found. Please add the directory containing pg_config to the PATH or specify the full executable path with the option: python setup.py build_ext –pg-config /path/to/pg_config build … or with the pg_config option in 'setup.cfg'. —————————————- Command python setup.py egg_info failed with error code 1 in /tmp/pip-build/psycopg2 但问题是pg_config实际上是在我的PATH ; […]