有人知道Python模块名称背后的逻辑与easy_install中使用的实际包的名称吗?
一些(以及其他)示例对我来说似乎有些不合逻辑:
easy_install mysql-python,但实际上是进口import MySQLdbeasy_install python-memcached,但实际上是进口import memcache(没有尾随d)我找不到找到等价的一致方法.对于某些模块,我花了很多时间浏览它.我究竟做错了什么?
我想在Mac OS X 10.6.8上安装Python Pandas库(0.8.1).这个库需要Numpy> = 1.6.
我试过这个
$ sudo easy_install pandas
Searching for pandas
Reading http://pypi.python.org/simple/pandas/
Reading http://pandas.pydata.org
Reading http://pandas.sourceforge.net
Best match: pandas 0.8.1
Downloading http://pypi.python.org/packages/source/p/pandas/pandas-0.8.1.zip#md5=d2c5c5bea971cd760b0ae6f6850fcb74
Processing pandas-0.8.1.zip
Running pandas-0.8.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ckAMym/pandas-0.8.1/egg-dist-tmp-0mlL7t
error: Setup script exited with pandas requires NumPy >= 1.6 due to datetime64 dependency
Run Code Online (Sandbox Code Playgroud)
所以我试着安装Numpy
$ sudo easy_install numpy
Searching for numpy
Best match: numpy 1.6.2
Adding numpy 1.6.2 to easy-install.pth file
Using /Library/Python/2.6/site-packages
Processing dependencies for numpy
Finished processing dependencies for numpy
Run Code Online (Sandbox Code Playgroud)
所以我又试了一次
$ …Run Code Online (Sandbox Code Playgroud) 我做了pip install -U easyinstall,然后pip install -U pip来升级我的pip.但是,在尝试使用pip时,我现在收到此错误:
root@d8fb98fc3a66:/# which pip
/usr/local/bin/pip
root@d8fb98fc3a66:/# pip
bash: /usr/bin/pip: No such file or directory
Run Code Online (Sandbox Code Playgroud)
这是在docker镜像中的ubuntu 12.04上.
我有一个python库.不幸的是我还没有更新它以使用python 3.
在我的setup.py中,我补充道
install_requires=['python<3'],
Run Code Online (Sandbox Code Playgroud)
我的意图是不允许在python 3下安装/使用这个包,因为我知道它还没有(还)工作.我不认为这是正确的方法,因为pip然后尝试下载并安装python 2.7.3(已经是已安装的版本!).
我应该如何在特定范围的python解释器版本上指定我的库依赖?我应该添加Programming Language :: Python :: 2 :: Only标签吗?这实际上会阻止在python 3下安装吗?如果我还想将最低版本限制为python 2.6怎么办?
我更喜欢一种可以在任何地方使用的解决方案,但是只能使用一种解决方案pip(并且希望不会导致easy_install阻塞).
我正在尝试审计具有大量依赖项的Python项目,虽然我可以手动查找每个项目的主页/许可条款,但似乎大多数OSS软件包应该已经在其元数据中包含许可证名称和版本.
不幸的是我找不到pip或easy_install中的任何选项来列出超过包名和安装版本(通过pip冻结).
有没有人指向一个工具来列出Python包的许可证元数据?
我使用easy_install来安装pip,pip来安装django,virtualenv和virtualenvwrapper.
几周之后我刚刚回到它并且django似乎不再工作了,但更令人担心的是我无法再次启动该过程,因为easy_install返回以下错误:
Traceback (most recent call last):
File "/usr/bin/easy_install-2.7", line 10, in <module>
load_entry_point('setuptools==0.6c12dev-r88846', 'console_scripts', 'easy_install')()
File "/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 318, in load_entry_point
File "/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 2220, in load_entry_point
ImportError: Entry point ('console_scripts', 'easy_install') not found
Run Code Online (Sandbox Code Playgroud)
经过一个愉快的狩猎之夜后,我很难过如何解决这个问题.
我使用easy_install安装了几个Python模块.我该如何卸载它们?
我看不到列出的卸载选项easy_install --help.
我在Windows上使用python 2.7.当我尝试使用[setuptools] [2]的easy_install安装[lxml] [1]时,怎么会出现以下错误?
C:\>easy_install lxml
Searching for lxml
Reading http://pypi.python.org/simple/lxml/
Reading http://codespeak.net/lxml
Best match: lxml 2.3.3
Downloading http://lxml.de/files/lxml-2.3.3.tgz
Processing lxml-2.3.3.tgz
Running lxml-2.3.3\setup.py -q bdist_egg --dist-dir c:\users\my_user\appdata\local\temp\easy_install-mtrdj2\lxml-2.3.3\egg-dist-tmp-tq8rx4
Building lxml version 2.3.3.
Building without Cython.
ERROR: 'xslt-config' is not recognized as an internal or external command,
operable program or batch file.
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
warning: no files found matching 'lxml.etree.c' under directory 'src\lxml'
warning: no files …Run Code Online (Sandbox Code Playgroud) 这是一个类似的问题我如何让setuptools安装一个不在PyPI上的软件包?但不一样.
由于我想使用某些包的分叉版本,setuptools会忽略依赖关系链接(因为它具有相同的版本号).
有没有办法强制使用dependency_links中的链接?或者是更改分叉回购中版本号的唯一方法?
requires = [
...
'pyScss==1.1.3'
...
dependencies = [
'https://github.com/nadavshatz/pyScss/zipball/master#egg=pyScss-1.1.3'
]
Run Code Online (Sandbox Code Playgroud)
更新
奇怪的是,如果这个包是所需列表中唯一尚未安装的包,显然它可以工作.如果有另一个丢失的包,它将从pypi下载它.
I don't have root access and i want to install python from scratch. So I downloaded the python source code and compiled it. Next I wanted to install pip. But when I ran python get-pip.py I got this error:
ImportError: cannot import name HTTPSHandler
Not having root access then I couldn't install stuff needed. So I thought maybe I can install pip with easy_install so I went and installed setuptools which has easy_install. But when I run easy_install …
easy-install ×10
python ×10
pip ×7
setuptools ×2
bash ×1
distutils ×1
egg ×1
licensing ×1
lxml ×1
macos ×1
numpy ×1
pandas ×1
pypi ×1
python-2.7 ×1
setup.py ×1
virtualenv ×1