小编Ger*_*Yin的帖子

给定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
查看次数

尝试在openSUSE上安装pip时出错

我正在尝试pip在我的生产服务器上进行部署,但是有一个不合逻辑的错误,它试图在没有成功的情况下安装已安装的composent.

~> sudo zypper in python-pip
Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: python-pip-1.0.2-3.1.2.noarch requires python = 2.7, but this requirement cannot be provided
  uninstallable providers: python-2.7.2-7.10.1.i586[Updates-for-openSUSE-12.1-12.1-1.4]
                   python-2.7.2-7.17.1.i586[Updates-for-openSUSE-12.1-12.1-1.4]
                   python-2.7.2-7.10.1.x86_64[Updates-for-openSUSE-12.1-12.1-1.4]
                   python-2.7.2-7.17.1.x86_64[Updates-for-openSUSE-12.1-12.1-1.4]
                   python-2.7.2-7.1.3.x86_64[openSUSE-12.1-12.1-1.4]
                   python-2.7.2-7.1.3.i586[repo-oss]
                   python-2.7.2-7.1.3.x86_64[repo-oss]
 Solution 1: deinstallation of patterns-openSUSE-minimal_base-conflicts 12.1-25.21.1.x86_64
 Solution 2: do not install python-pip-1.0.2-3.1.2.noarch
 Solution 3: do not install python-pip-1.0.2-3.1.2.noarch
 Solution 4: break python-pip-1.0.2-3.1.2.noarch by ignoring some of its dependencies

Choose from above solutions by number or cancel [1/2/3/4/c] (c): c
Run Code Online (Sandbox Code Playgroud)

这是令人难以置信的,因为python-2.7.2-7.17.1安装好的平台(x86_64) …

python pip rpm opensuse

5
推荐指数
1
解决办法
4058
查看次数

标签 统计

pip ×2

python ×2

easy-install ×1

opensuse ×1

pypi ×1

rpm ×1