pip是一个替代品easy_install.但是我应该在Windows上安装pip使用easy_install吗?有没有更好的办法?
我正在尝试将一个开源库移植到Python 3.(SymPy,如果有人想知道的话.)
所以,我需要2to3在为Python 3构建时自动运行.为此,我需要使用distribute.因此,我需要移植当前系统(根据doctest)distutils.
不幸的是,我不知道什么是这些模块-之间的区别distutils,distribute,setuptools.文档是最好的粗略,因为它们似乎都是彼此的分支,旨在在大多数情况下兼容(但实际上,不是全部)......等等.
有人可以解释这些差异吗?我应该用什么?什么是最现代的解决方案?(Distribute顺便说一句,我也很欣赏一些关于移植的指南,但这有点超出了问题的范围......)
我有两个python2.7并python3.2安装在Ubuntu 12.04.
符号链接python链接到python2.7.
当我输入:
sudo pip install package-name
Run Code Online (Sandbox Code Playgroud)
它将默认安装python2版本package-name.
有些包支持python2和python3.
如何安装via python3版本?package-namepip
Python有一个包/模块管理系统,类似于Ruby有rubygems的地方gem install packagename吗?
在安装Python模块时,我只看到对它的引用python setup.py install,但这需要您首先找到该包.
我正在尝试安装pip3,但我没有运气.此外,我试过sudo install,它没有用.我怎么能在我的Mac上安装pip3?
sudo easy_install pip3
Password:
Searching for pip3
Reading https://pypi.python.org/simple/pip3/
Couldn't find index page for 'pip3' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for pip3
error: Could not find suitable distribution for Requirement.parse('pip3')
Run Code Online (Sandbox Code Playgroud) CentOS 7 EPEL现在包含Python 3.4: yum install python34
但是,当我尝试这样做时,即使Python 3.4成功安装,它似乎也没有安装pip.这很奇怪,因为pip默认情况下应该包含在Python 3.4中.which pip3找不到任何东西,也没有找到which pip.
如何从CentOS 7 EPEL版本的Python 3.4包中访问pip?
操作系统:Mac OS X 10.7.5 Python Ver:2.7.5
我已经安装了ez_setup.py setuptools的1.0从https://pypi.python.org/pypi/setuptools 然后,我从下载pip.1.4.1 PKG https://pypi.python.org/pypi/pip/1.4.1.
在iTerm中运行"[sudo] python setup.py install"显示
运行安装运行bdist_egg运行egg_info写入要求到pip.egg-info/requires.txt写pip.egg-info/PKG-INFO写顶级名称到pip.egg-info/top_level.txt将dependency_links写入pip.egg- info/dependency_links.txt写入条目指向pip.egg-info/entry_points.txt警告:manifest_maker:未找到标准文件'setup.py'
读取清单文件'pip.egg-info/SOURCES.txt'编写清单文件'pip.egg-info/SOURCES.txt'安装库代码来构建/ bdist.macosx-10.6-intel/egg运行install_lib警告:install_lib:' build/lib'不存在 - 没有要安装的Python模块
创建build/bdist.macosx-10.6-intel/egg创建build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/PKG-INFO - > build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/SOURCES.txt - > build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/dependency_links.txt - > build/bdist.macosx- 10.6-intel/egg/EGG-INFO复制pip.egg-info/entry_points.txt - > build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/not-zip-safe - > build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/requires.txt - > build/bdist.macosx-10.6-intel/egg/EGG-INFO复制pip.egg-info/top_level .txt - > build/bdist.macosx-10.6-intel/egg/EGG-INFO创建'dist/pip-1.4.1-py2.7.egg'并添加'build/bdist.macosx-10.6-intel/egg'删除'build/bdist.macosx-10.6-intel/egg'(及其下的所有内容)处理pip-1.4.1-py2.7.egg删除'/Users/dl/Library/Python/2.7/lib/python /site-packages/pip-1.4.1-py2.7.egg'(及其下的所有内容)创建/ Users/dl/Library/Python/2 .7/lib/python/site-packages/pip-1.4.1-py2.7.egg将pip-1.4.1-py2.7.egg解压缩到/Users/dl/Library/Python/2.7/lib/python/ site-packages pip 1.4.1已经是easy-install.pth中的活动版本.将pip脚本安装到/Users/dl/Library/Python/2.7/bin将pip-2.7脚本安装到/Users/dl/Library/Python/2.7 /箱
已安装/Users/dl/Library/Python/2.7/lib/python/site-packages/pip-1.4.1-py2.7.egg pip的处理依赖关系== 1.4.1 pip的完成处理依赖关系== 1.4.1
然后我输入了"pip install",错误信息显示出来
回溯(最近一次调用最后一次):文件"/Library/Frameworks/Python.framework/Versions/2.7/bin/pip",第9行,在load_entry_point中('pip == 1.4.1','console_scripts','pip' )()文件"build/bdist.macosx-10.6-intel/egg/pkg_resources.py",第357行,在load_entry_point文件"build/bdist.macosx-10.6-intel/egg/pkg_resources.py",第2394行, load_entry_point文件"build/bdist.macosx-10.6-intel/egg/pkg_resources.py",第2108行,in load ImportError:没有名为pip的模块
以前遇到过同样问题的人可以给我一些解决方法吗?
我已经安装了django rest框架pip install djangorestframework但是当我运行"python3 manage.py sycndb"时我仍然遇到这个错误:
ImportError:没有名为'rest_framework'的模块
我正在使用python3,这是我的问题吗?
我使用python 2.7,3.5.2和3.6.通常pip3使用python3.x安装.但......
代码:
where pip3
Run Code Online (Sandbox Code Playgroud)
给我:
信息:无法找到给定模式的文件.
我怎样才能解决这个问题?
对于我使用的python 3.2 sudo apt-get install python3.2-numpy.它工作.怎么做python3.3?没有什么我能想到的工作.同样适用于scipy等.谢谢.
编辑:这是它的样子
radu@sunlit-inspired:~$ python3
Python 3.3.2 (default, Jul 3 2013, 10:17:40)
[GCC 4.6.3] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'numpy'
Run Code Online (Sandbox Code Playgroud) python ×8
pip ×7
python-3.x ×5
windows ×2
centos7 ×1
distribute ×1
distutils ×1
django ×1
easy-install ×1
installation ×1
module ×1
numpy ×1
packaging ×1
python-3.4 ×1
setuptools ×1
ubuntu ×1
ubuntu-12.04 ×1