标签: easy-install

给定Python包的名称,要导入的模块的名称是什么?

有人知道Python模块名称背后的逻辑与easy_install中使用的实际包的名称吗?

一些(以及其他)示例对我来说似乎有些不合逻辑:

  • 我们这样做easy_install mysql-python,但实际上是进口import MySQLdb
  • 我们这样做easy_install python-memcached,但实际上是进口import memcache(没有尾随d)

我找不到找到等价的一致方法.对于某些模块,我花了很多时间浏览它.我究竟做错了什么?

python pip easy-install pypi

29
推荐指数
2
解决办法
4947
查看次数

如何修复Python Numpy/Pandas安装?

我想在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)

python numpy pip easy-install pandas

29
推荐指数
4
解决办法
10万
查看次数

升级后破了点子

我做了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 bash pip easy-install

29
推荐指数
1
解决办法
1万
查看次数

setup.py:限制python解释器的允许版本

我有一个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 pip easy-install setup.py

28
推荐指数
2
解决办法
5796
查看次数

可以pip(或setuptools,分发等...)列出每个已安装软件包使用的许可证吗?

我正在尝试审计具有大量依赖项的Python项目,虽然我可以手动查找每个项目的主页/许可条款,但似乎大多数OSS软件包应该已经在其元数据中包含许可证名称和版本.

不幸的是我找不到pip或easy_install中的任何选项来列出超过包名和安装版本(通过pip冻结).

有没有人指向一个工具来列出Python包的许可证元数据?

python licensing pip virtualenv easy-install

28
推荐指数
4
解决办法
1万
查看次数

easy_install:ImportError:找不到入口点('console_scripts','easy_install')

我使用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)

经过一个愉快的狩猎之夜后,我很难过如何解决这个问题.

python macos easy-install

27
推荐指数
1
解决办法
2万
查看次数

如何卸载我使用easy_install安装的Python模块("egg")?

我使用easy_install安装了几个Python模块.我该如何卸载它们?

我看不到列出的卸载选项easy_install --help.

python egg easy-install

26
推荐指数
1
解决办法
4万
查看次数

Windows上的Python 2.7上的easy_install lxml

我在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)

python lxml setuptools easy-install python-2.7

25
推荐指数
3
解决办法
6万
查看次数

如何让setuptools从另一个源安装一个包,该源也可以在pypi上使用相同的版本号?

这是一个类似的问题我如何让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下载它.

python distutils pip setuptools easy-install

24
推荐指数
2
解决办法
8304
查看次数

Installing pip using easy_install

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 …

python pip easy-install

24
推荐指数
3
解决办法
6万
查看次数