pip,virtualenv和distribute?在我对问题4314376的回答中,我建议使用,ez_setup以便您可以安装pip并virtualenv如下:
curl -O http://peak.telecommunity.com/dist/ez_setup.py
sudo python ez_setup.py
sudo easy_install pip
sudo pip install virtualenv
Run Code Online (Sandbox Code Playgroud)
我最初是从Jesse Noller的博客文章中提取这些说明的,所以你想在Mac上使用Python?.我喜欢保持一个干净的全局site-packages目录的想法,所以我安装的唯一其他软件包就是 virtualenvwrapper和distribute.(distribute由于这个Python公共服务公告,我最近添加到了我的工具箱.为了安装这两个软件包,我使用了:
sudo pip install virtualenvwrapper
curl -O http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py
Run Code Online (Sandbox Code Playgroud)
要真正遵循Python公共服务公告,在全新的Python安装上,我会执行以下操作:
curl -O http://python-distribute.org/distribute_setup.py
sudo python distribute_setup.py
sudo easy_install pip
sudo pip install virtualenv
sudo pip install virtualenvwrapper
Run Code Online (Sandbox Code Playgroud)
在一个评论我的回答 …
PyPi现在在1.1.0显示matplotlib所以这个问题已经解决了.通过以下方式安装matplotlib:
pip install matplotlib
PyPi显示了matplotlib 1.0.0.但是,当我通过pip将matplotlib安装到virtualenv时,安装了版本0.91.1.
似乎matplotlib在PyPi上的DOAP记录指向了正确的版本.以下是DOAP记录供参考:
<?xml version="1.0" encoding="UTF-8" ?>
<rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><Project><name>matplotlib</name>
<shortdesc>Python plotting package</shortdesc>
<description>matplotlib strives to produce publication quality 2D graphics
for interactive graphing, scientific publishing, user interface
development and web application servers targeting multiple user
interfaces and hardcopy output formats. There is a 'pylab' mode
which emulates matlab graphics</description>
<download-page>https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0</download-page>
<homepage rdf:resource="http://matplotlib.sourceforge.net" />
<maintainer><foaf:Person><foaf:name>John D. Hunter</foaf:name>
<foaf:mbox_sha1sum>4b099b4a7f50a1f39642ce59c2053c00d4de6416</foaf:mbox_sha1sum></foaf:Person></maintainer> …Run Code Online (Sandbox Code Playgroud) 目标:
python setup.py install --single-version-externally-managed或pip install。请参阅为什么我无法通过手动* python setup.py install *获得准确的结果到* pip install *?简短的问题:
我喜欢仅通过已编译的* .pyc(或* .pyo)文件将专有的命名空间包部署到virtualenv中,其中文件/目录层次结构只是通过许多ooxx.egg路径污染sys.path来反映名称空间。
我尝试过的东西:
python setup.py bdist_egg --exclude-source-files然后easy_install ooxx.egg。
python setup.py install --single-version-externally-managed。
pip install . 在“ setup.py”的位置。
在某种程度上,这个问题已被问到......所以接受我的道歉......
我想从这里安装最新版本的matplotlib:http: //pypi.python.org/pypi/matplotlib/1.0.1
我知道我可以下载它,解压缩并编译它,但我要将它安装在许多机器上,而pip应该是一种幸福.
所以,我做了easy_install pip,这里是我用两种工具得到的输出:
$ sudo easy_install "matplotlib==1.0.1"
install_dir /usr/local/lib/python2.6/dist-packages/
Searching for matplotlib==1.0.1
Reading http://pypi.python.org/simple/matplotlib/
Reading http://matplotlib.sourceforge.net
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.3/
Reading http://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=278194
Reading http://sourceforge.net/project/showfiles.php?group_id=80706
Reading https://sourceforge.net/project/showfiles.php?group_id=80706&package_id=82474
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-0.99.1/
Reading https://sourceforge.net/projects/matplotlib/files/matplotlib/matplotlib-1.0.1/
No local packages or download links found for matplotlib==1.0.1
error: Could not find suitable distribution for Requirement.parse('matplotlib==1.0.1')
Run Code Online (Sandbox Code Playgroud)
或者用pip:
$ pip install matplotlib==1.0.1
Downloading/unpacking matplotlib==1.0.1
Could not find a version that satisfies the requirement matplotlib==1.0.1 (from versions: )
No distributions matching the version for …Run Code Online (Sandbox Code Playgroud) python ×3
matplotlib ×2
pip ×2
setuptools ×2
virtualenv ×2
distribute ×1
easy-install ×1
packaging ×1
pypi ×1