pip
是一个替代品easy_install
.但是我应该在Windows上安装pip
使用easy_install
吗?有没有更好的办法?
一个鸣叫曰:
不要使用easy_install,除非你喜欢刺伤自己的脸.使用点子.
为什么要使用pip而不是easy_install?问题不在于PyPI和包装作者吗?如果作者将垃圾源tarball(例如:丢失文件,没有setup.py)上传到PyPI,那么pip和easy_install都将失败.除了化妆品差异,为什么Python人(如上面的推文)似乎强烈支持pip而不是easy_install?
(我们假设我们正在讨论来自Distribute包的easy_install,这是由社区维护的)
Python easy_install
使得安装新包非常方便.但是,据我所知,它没有实现依赖项管理器的其他常见功能 - 列出和删除已安装的软件包.
找出已安装的内容的最佳方法是什么,以及删除已安装软件包的首选方法是什么?如果我手动删除包(例如,通过rm /usr/local/lib/python2.6/dist-packages/my_installed_pkg.egg
或类似),是否有任何文件需要更新?
我在Ubuntu 11上使用easy_install安装lxml时遇到了困难.
当我输入时,$ easy_install lxml
我得到:
Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Reading http://codespeak.net/lxml
Best match: lxml 2.3
Downloading http://lxml.de/files/lxml-2.3.tgz
Processing lxml-2.3.tgz
Running lxml-2.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7UdQOZ/lxml-2.3/egg-dist-tmp-GacQGy
Building lxml version 2.3.
Building without Cython.
ERROR: /bin/sh: xslt-config: not found
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
In file included from src/lxml/lxml.etree.c:227:0:
src/lxml/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or directory
compilation terminated.
Run Code Online (Sandbox Code Playgroud)
似乎libxslt
或libxml2
没有安装.我已尝试按照http://www.techsww.com/tutorials/libraries/libxslt/installation/installing_libxslt_on_ubuntu_linux.php …
有没有办法找到所有使用easy_install或pip安装的Python PyPI包?我的意思是,排除使用分发工具安装的所有内容(在本例中为apt-get on Debian).
我对python包安装过程感到有点恼火.具体来说,dist-packages目录中安装的软件包与site-packages目录之间的区别是什么?
我在shell中使用此命令来安装PIL:
easy_install PIL
Run Code Online (Sandbox Code Playgroud)
然后我跑去python
输入:import PIL
.但我得到这个错误:
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named PIL
Run Code Online (Sandbox Code Playgroud)
我从未遇到过这样的问题,您怎么看?
python setup.py install
将自动安装requires=[]
使用中列出的包easy_install
.我怎样才能使用它pip
呢?
我在Windows 7 64位上运行Python 2.7,当我运行setuptools的安装程序时,它告诉我没有安装Python 2.7.具体的错误消息是:
`Python Version 2.7 required which was not found in the registry`
Run Code Online (Sandbox Code Playgroud)
我安装的Python版本是:
`Python 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32`
Run Code Online (Sandbox Code Playgroud)
我正在查看setuptools站点,它没有提到64位Windows的任何安装程序.我是否遗漏了某些内容或者是否必须从源代码安装此内容?
下载python包的最佳方法是什么?它是pypi的依赖关系,可以在另一台机器上进行离线安装?使用pip或easy_install有什么简单的方法吗?我正在尝试在没有连接到互联网的FreeBSD盒子上安装请求库.
easy-install ×10
python ×10
pip ×6
setuptools ×3
pypi ×2
freebsd ×1
installation ×1
libxml2 ×1
lxml ×1
packages ×1
ubuntu ×1
windows ×1