distribute

python的packages管理

房东的猫 提交于 2019-12-05 14:43:15
一、概念介绍 Python is known for it's “batteries included” philosophy and has a rich standard library。However, being a popular language, the number of third party packages is much larger than the number of standard library packages. So it eventually becomes necessary to discover how packages are used, found and created in Python. 目前python提供的包管理工具有多个,其关系如下: 具体可以参见: http://guide.python-distribute.org/introduction.html 可以看出,Distribute代替了Setuptools, 但将来会被distutils2取代,并作为标准库的一部分。 关于packages的管理,则由pip进行 有关packages的发布,查找的网站是: https://pypi.python.org/pypi Distribute是对标准库disutils模块的增强,disutils主要是用来更加容易的打包和分发包

can't not install Distribute, zlib

寵の児 提交于 2019-12-05 08:44:17
At first, I only want to use install feedparser with python3.2, while it need Distribute. When I install Distribute with python3.2 setup.py install I got File "/usr/local/lib/python3.2/zipfile.py", line 687, in __init__ "Compression requires the (missing) zlib module") RuntimeError: Compression requires the (missing) zlib module Then I downloaded zlib and installed it with ./configure --prefix=/usr/local/python3.2 make sudo make install After the installation, and tried to install Distribute, I got the same error. Finally, I solved it by re-install python3.2 with zlib. 1 Of course, you need to

easy_install with pypy while Python is installed

心不动则不痛 提交于 2019-12-04 20:13:25
问题 I installed PyPy while still having Python 2.7 on my system. How do I install and then use easy_install with PyPy? What is the syntax for distinguishing where I want to install to with easy_install ? Should I set any environment variables for ease of use? I'm on Windows, but these questions seem relevant for all platform... 回答1: You need to install easy_install for pypy manually. It's explained in the answer to this question : Installing Python eggs under PyPy 回答2: An alternative solution is

Distributing python code with virtualenv?

十年热恋 提交于 2019-12-04 18:02:53
问题 I want to distribute some python code, with a few external dependencies, to machines with only core python installed (and users that unfamiliar with easy_install etc.). I was wondering if perhaps virtualenv can be used for this purpose? I should be able to write some bash scripts that trigger the virtualenv (with the suitable packages) and then run my code.. but this seems somewhat messy, and I'm wondering if I'm re-inventing the wheel? Are there any simple solutions to distributing python

How can I make setuptools (or distribute) install a package from the local file system

只谈情不闲聊 提交于 2019-12-04 15:39:15
问题 Is it possible to specify (editable) source dependencies in setup.py that are known to reside on the local file system? Consider the following directory structure, all of which lives in a single VCS repository: projects utils setup.py ... app1 setup.py ... # app1 files depend on ../utils app2 setup.py ... # app2 files depend on ../utils Given the following commands: cd projects mkvirtualenv app1 pip install -e app1 I'd like to have all the dependencies for app1 installed, including "utils",

Installing Python and distribute on Windows 7 gives “Writing failed … permission denied”

走远了吗. 提交于 2019-12-04 04:56:10
问题 I'm on Windows 7 (which I fully admit I don't understand the permissions model of. I'm reading about it in other tabs.) My user is an administrator. When I try to run "python distribute_setup.py" I get "writing failed ... permission denied" errors and then "error: can't create or remove files in install directory". I've freshly installed the Python 3.2.2 MSI installer from python.org. I'm installing 32-bit Python even though I'm on 64 bit Windows, because I will have some dependencies that

Installing my sdist from PyPI puts the files in unexpected places

梦想与她 提交于 2019-12-04 04:44:04
My problem is that when I upload my Python package to PyPI, and then install it from there using pip, my app breaks because it installs my files into completely different locations than when I simply install the exact same package from a local sdist. Installing from the local sdist puts files on my system like this: /Python27/ Lib/ site-packages/ gloopy-0.1.alpha-py2.7.egg/ (egg and install info files) data/ (images and shader source) doc/ (html) examples/ (.py scripts that use the library) gloopy/ (source) This is much as I'd expect, and works fine (e.g. my source can find my data dir,

Add a dll/so to a python built distribution

大憨熊 提交于 2019-12-04 04:17:51
I've compiled the python wrapper of nanomsg and I want to create a python installer for the package. The package can be created by running python setup.py bdist --format=wininst However I would like nanomsg.dll/nanomsg.so to be included in the installer/package but I haven't found any documentation regarding this issue. Shleimeleh As stated in the documentation here one needs to add the following code to his setup.py script: setup( name='nanomsg', version=__version__, packages=[str('nanomsg'), str('_nanomsg_ctypes'), str('nanomsg_wrappers')], data_files=[('lib\\site-packages\\',["C:\\Dev\

easy_install with pypy while Python is installed

社会主义新天地 提交于 2019-12-03 12:45:51
I installed PyPy while still having Python 2.7 on my system. How do I install and then use easy_install with PyPy? What is the syntax for distinguishing where I want to install to with easy_install ? Should I set any environment variables for ease of use? I'm on Windows, but these questions seem relevant for all platform... Julien Chappuis You need to install easy_install for pypy manually. It's explained in the answer to this question : Installing Python eggs under PyPy An alternative solution is to install pip. Following the instructions in pip's documentation : wget https://bootstrap.pypa

How to determine the name of an egg for a Python package on Github?

喜欢而已 提交于 2019-12-03 10:52:02
I know I can install with $ pip install -e git+https://git.repo/some_pkg#egg=SomePackage but -- when I'm trying to use somebody else's package -- how do I determine what the name of the egg is? Look at the git repo, find the setup.py file in the root and find what is passed to the name keyword in the setup() function call. For example, the Pyramid setup.py has: setup(name='pyramid', so you'd use: $ pip install -e git+https://github.com/Pylons/pyramid.git#egg=pyramid 来源: https://stackoverflow.com/questions/21638929/how-to-determine-the-name-of-an-egg-for-a-python-package-on-github