我在setup.py中有dependency_links:
...
dependency_links = ['http://github.com/robot-republic/python-s3/tarball/master.tar.gz#egg=python-s3'],
...
Run Code Online (Sandbox Code Playgroud)
但它不起作用.但是install_requires工作正常.也许有另一种方法来设置setup.py所需的git repo?
我有一台运行Python 2.6的Mac.当我尝试使用时,easy_install
我收到此消息:
/usr/bin/easy_install-2.6:7: UserWarning: Module pkg_resources was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
from pkg_resources import load_entry_point
/usr/bin/easy_install-2.6:7: UserWarning: Module site was already imported from /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site.pyc, but /Library/Python/2.6/site-packages is being added to sys.path
from pkg_resources import load_entry_point
Traceback (most recent call last):
File "/usr/bin/easy_install-2.6", line 10, in <module>
load_entry_point('setuptools==0.6c9', 'console_scripts', 'easy_install')()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 271, in load_entry_point
return False
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 2173, in load_entry_point
deps = []
ImportError: Entry point ('console_scripts', 'easy_install') …
Run Code Online (Sandbox Code Playgroud) 如何停止setup.py
将包装作为鸡蛋?或者甚至更好,我如何easy_install
安装包作为egg
?
sudo python setup.py安装
原因是对于格式化的软件包PyDev
非常挑剔egg
...我现在感兴趣的软件包是boto
.
更新:我找到了蛮力的方式:
sudo easy_install -m boto
cd path/to/boto-xyz.egg
sudo mv boto ..
sudo rm -rf boto-xyz.egg
Run Code Online (Sandbox Code Playgroud) 我知道我可以用Java安装Jython,并且我可以在使用Python的地方使用Jython.Jython shell工作正常.
在Jython中,我如何安装类似的库lxml
,Scrappy
并且BeautifulSoup
我通常通过pip
或安装easy_install
我已经设法在我的Mac上安装spyder并运行,但我想添加一些默认情况下不包含的模块(mahotas和pymorph).
我通过easy_install在终端安装了两个,两者似乎都没有任何错误消息安装.从终端运行python并使用import mahotas和import pymorph工作正常,没有错误消息.但是,当我从spyder中的脚本运行相同的行时,我收到以下错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/spyderlib/widgets/externalshell/sitecustomize.py", line 493, in runfile
execfile(filename, namespace)
File "/Users/Name/Documents/Python/dna.py", line 11, in <module>
import pymorph
ImportError: No module named pymorph
Run Code Online (Sandbox Code Playgroud)
我现在要做的就是运行导入线,就是这样.我似乎无法找到任何关于此的内容.我猜测spyder使用单独的python安装,并且通过终端安装模块只将它们安装到python的系统版本.如何将它们添加到spyder?
眼镜:
Mac OSX 10.7.4
Spyder 2.1.9
我已经安装了MSVC++ 2010 Express,而我的vcvarsall.bat文件C:\Program Files\Microsoft Visual Studio 10.0\VC
位于我的系统PATH中.当我运行时easy_install
,它找不到vcvarsall.bat.
我需要在distutils.cfg文件中设置一些东西来指向我的MSVC++安装吗?
G:\>easy_install hg-git
install_dir C:\Python26\Lib\site-packages\
Searching for hg-git
Best match: hg-git 0.2.6
Processing hg_git-0.2.6-py2.6.egg
hg-git 0.2.6 is already the active version in easy-install.pth
Using c:\python26\lib\site-packages\hg_git-0.2.6-py2.6.egg
Processing dependencies for hg-git
Searching for dulwich>=0.6.0
Reading http://pypi.python.org/simple/dulwich/
Reading http://samba.org/~jelmer/dulwich
Reading http://launchpad.net/dulwich
Best match: dulwich 0.7.1
Downloading http://www.samba.org/~jelmer/dulwich/dulwich-0.7.1.tar.gz
Processing dulwich-0.7.1.tar.gz
Running dulwich-0.7.1\setup.py -q bdist_egg --dist-dir c:\docume~1\mlin\locals~1
\temp\easy_install-fhraep\dulwich-0.7.1\egg-dist-tmp-qozily
error: Setup script exited with error: Unable to find vcvarsall.bat
Run Code Online (Sandbox Code Playgroud) 我正在尝试安装使用easy_install的couchapp - 并且非常明确地说明需要特定版本的easy_install/setuptools:0.6c6.我似乎已经在我的Mac上安装了easy_install,但是没有命令行参数来检查版本.我不想仅仅在顶部安装新版本,而是先看看是否有必要.
那么:关于我如何看到我的机器上安装了什么版本的setuptools/easy_install的指示?
我不是Python开发人员,所以我假设这是一个简单的问题.但是,我没有通过谷歌或SOF在这里找到任何东西.
我可以运行iPython,但是当我尝试启动笔记本时出现以下错误:
~ ipython notebook
Traceback (most recent call last):
File "/usr/local/bin/ipython", line 8, in <module>
load_entry_point('ipython==2.1.0', 'console_scripts', 'ipython')()
File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/__init__.py", line 120, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/config/application.py", line 563, in launch_instance
app.initialize(argv)
File "<string>", line 2, in initialize
File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/terminal/ipapp.py", line 321, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<string>", line 2, in initialize
File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/config/application.py", line 92, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/ipython-2.1.0-py2.7.egg/IPython/core/application.py", line 381, in initialize …
Run Code Online (Sandbox Code Playgroud) 我在Windows 7上安装了Python 2.7.1,但我无法安装easy_install.请帮我.
我有easy_install
和pip
.
我的Linux Mint 12上有很多错误,我刚刚重新安装它,我想再次从头开始安装.
这是我遇到的错误之一.我收到了一个有趣的答案:
停止使用su和sudo来运行virtualenv.
您需要以普通用户身份运行virtualenv.
你用sudo创建了virtualenv,这就是你得到这些错误的原因.
那么如何安装virtualenv
而不使用sudo
?我可以使用pip
或easy_install
不使用sudo
?或者还有另一种方式吗?
easy-install ×10
python ×10
pip ×4
setuptools ×3
distutils ×2
django ×1
import ×1
ipython ×1
java ×1
jython ×1
macos ×1
module ×1
pydev ×1
spyder ×1
virtualenv ×1