我试图找出如何安装没有pipsetup.py文件的python包.(有问题的包是http://code.google.com/p/django-google-analytics/)
通常我会将repo和符号链接中的代码签出到我的站点包中,但我试图将整个环境冻结成一个pip需求文件,以便于部署和测试.
有任何想法吗?
所以我发现帮助安装cx_Oracle但仍然卡住了.我从oracle下载了最新的instantclient,并将ORACLE_HOME设置为解压缩文件的位置(直接和ORACLE_HOME值与文件之间的bin文件夹),但easy_install在运行setup.py时弹出错误说它可以'找到Oracle包含文件.我注意到文件夹中只有11g dll,我是否需要所有3个驱动程序才能完成设置?如果是这样,我在哪里获得它们?
目标:我正在使用RedHat 5并尝试为Web应用程序安装最新的python和django.
我成功地安装了python27和easy_install,并使用openssl进行了wget.
问题:但是现在我尝试从pypi.python.org获取任何内容我收到以下错误:
$ sudo easy_install --verbose django
Searching for django
Reading https://pypi.python.org/simple/django/
Download error on https://pypi.python.org/simple/django/: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some packages may not be found!
Couldn't find index page for 'django' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno 1] _ssl.c:507: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed -- Some packages may not be found!
No local packages or download links found for …Run Code Online (Sandbox Code Playgroud) 我使用的是Python 2.7.我正在尝试pip install一个repo(在内部github上),它依赖于另一个repo(也在内部github上).我尝试了几个选项但是有效的选项是这样的:
(env)abc$ cat requirements.txt
-e git://github.abc.com/abc/abc.git#egg=my_abc --process-dependency-links
(env)abc$ pip install -r requirements.txt
Run Code Online (Sandbox Code Playgroud)
但是在运行命令行时我收到了警告:
"DEPRECATION:Dependency Links处理已被弃用,将在未来的版本中删除."
我在点v7.1.2.这样做的正确方法是什么?
我已经VIRTUALENV与--no-site-packages选项.我正在使用scrapy.Scrapy使用libxml2的通过import libxml2.如何在virtualenv中使用pip或安装libxml2 easy_install?
如果我有一个模块,foo在Lib/site-packages,我可以import foo,它会工作.然而,当我从鸡蛋中安装东西时,我得到的东西就像blah-4.0.1-py2.7-win32.egg文件夹一样,里面有模块内容,但我仍然只需要做import foo,而不是更复杂.Python如何跟踪鸡蛋?它不仅仅是dirname匹配,就好像我将该文件夹放入Python安装而不通过dist-utils,它找不到模块.
更清楚:我刚刚安装了zope.文件夹名称为"zope.interface-3.3.0-py2.7-win32.egg".这有效:
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import zope.interface
>>>
Run Code Online (Sandbox Code Playgroud)
我创建了一个"blah-4.0.1-py2.7-win32.egg"文件夹,其中包含一个空模块"haha"(和__init__.py).这不起作用:
Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import blah.haha
Traceback (most recent call last):
File "<stdin>", line 1, in …Run Code Online (Sandbox Code Playgroud) 要点:在setup.py中检测到我们被触发的最佳方法是pip install package什么?
背景:我有一个包(C库的绑定),我提供包含库本身的蛋.在我的自述文件中,我注意到这个软件包在某些平台上是"easy_install-able".从源代码构建时(例如使用pip),库本身就是构建依赖项.问题是我经常让那些错误地认为pip完全替代easy_install的用户感到困惑,并期望pip install package在没有库的系统上工作,或者甚至没有编译器,其中的鸡蛋是他们真正想要的.
我想检测到构建是由pip触发的,所以如果由于缺少库而失败,我可以提供友好的"pip!= easy_install"消息.它不需要是完美的,只需抓住最常见的情况pip install package.在检查时,似乎没有一种特别强大的方法来做到这一点,我想出的最好的是:
probably_using_pip = '--single-version-externally-managed' in sys.argv
Run Code Online (Sandbox Code Playgroud)
是否有更好的(或更好的,官方的)方法来检测来自setup.py的pip?
有没有办法在使用代理服务器的企业网络上使用ez_setup.py安装Python的easy_install?目前,我收到连接超时:
Downloading http://pypi.python.org/packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg
Traceback (most recent call last):
File "C:\jsears\python\ez_setup.py", line 278, in <module>
main(sys.argv[1:])
File "C:\jsears\python\ez_setup.py", line 210, in main
egg = download_setuptools(version, delay=0)
File "C:\jsears\python\ez_setup.py", line 158, in download_setuptools
src = urllib2.urlopen(url)
File "C:\jsears\Python27\lib\urllib2.py", line 126, in urlopen
return _opener.open(url, data, timeout)
File "C:\jsears\Python27\lib\urllib2.py", line 400, in open
response = self._open(req, data)
File "C:\jsears\Python27\lib\urllib2.py", line 418, in _open
'_open', req)
File "C:\jsears\Python27\lib\urllib2.py", line 378, in _call_chain
result = func(*args)
File "C:\jsears\Python27\lib\urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req) …Run Code Online (Sandbox Code Playgroud) 我正在尝试安装Scrapy easy_install -U Scrapy但它最终会在尝试安装时出现一个奇怪的错误"无法打开包含文件".有人知道发生了什么吗?这是我完整的追溯:
C:\Users\Mubashar Kamran>easy_install -U Scrapy
Searching for Scrapy
Reading https://pypi.python.org/simple/Scrapy/
Best match: scrapy 0.24.4
Processing scrapy-0.24.4-py2.7.egg
scrapy 0.24.4 is already the active version in easy-install.pth
Installing scrapy-script.py script to C:\Python27\Scripts
Installing scrapy.exe script to C:\Python27\Scripts
Installing scrapy.exe.manifest script to C:\Python27\Scripts
Using c:\python27\lib\site-packages\scrapy-0.24.4-py2.7.egg
Processing dependencies for Scrapy
Searching for cryptography>=0.2.1
Reading https://pypi.python.org/simple/cryptography/
Best match: cryptography 0.5.4
Downloading https://pypi.python.org/packages/source/c/cryptography/cryptography-
0.5.4.tar.gz#md5=4fd1f10e9f99009a44667fabe7980aec
Processing cryptography-0.5.4.tar.gz
Writing c:\users\mubash~1\appdata\local\temp\easy_install-jjms3i\cryptography-0.
5.4\setup.cfg
Running cryptography-0.5.4\setup.py -q bdist_egg --dist-dir c:\users\mubash~1\ap
pdata\local\temp\easy_install-jjms3i\cryptography-0.5.4\egg-dist-tmp-ry6bwd
C:\Python27\lib\distutils\dist.py:267: UserWarning: Unknown distribution option:
'setup_requires' …Run Code Online (Sandbox Code Playgroud) 还有许多类似于此问题的其他StackOverflow问题,但在每种情况下,平台都不同或错误消息不同或解决方案没有效果或过时.我正在尝试设置Python 2.7.6 virtualenv并在其中安装模块,但easy_install给出了错误,指示setuptools不可用.但是AFAIK easy_install是setuptools的一部分,所以这没有任何意义.
问题只发生在virtualenv中.这就是我所做的:
yum -y update最新的东西,重新启动./configure; make; sudo make installpython -V给了我2.7.6并sudo python -V给了我2.7.6wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py--no-check-certificate标志添加到wget以解决我们网络中的代理服务器问题sudo python ez_setup.pysudo easy_install pipsudo pip install virtualenvvirtualenv virtpy. virtpy/bin/activateeasy_install elementtree除最后一个步骤外,所有这些步骤都成功,但失败的原因是:
Traceback (most recent call last):
File "/home/gperrow/virtpy/bin/easy_install", line 7, in <module>
from setuptools.command.easy_install import main
File "/home/gperrow/virtpy/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 44, in <module>
from setuptools.package_index import PackageIndex
File "/home/gperrow/virtpy/lib/python2.7/site-packages/setuptools/package_index.py", line 203, in <module> …Run Code Online (Sandbox Code Playgroud) easy-install ×10
python ×8
pip ×5
installation ×2
scrapy ×2
setuptools ×2
virtualenv ×2
cx-oracle ×1
django ×1
egg ×1
git ×1
module ×1
proxy ×1
pypi ×1
python-2.7 ×1
ssl ×1
windows ×1