setuptools

Installing Python-2.7 on Ubuntu 10.4

非 Y 不嫁゛ 提交于 2019-11-26 17:47:24
问题 I can't seem to install zlib properly, I installed Python from source on Ubuntu10.4 '######## edit ##################### bobince and Luper helped. Make sure you install these packages and then recompile Python: sudo aptitude install zlib1g-dev libreadline6-dev libdb4.8-dev libncurses5-dev '################################# After installation, I attempted to install setuptools.py $ sh setuptools-0.6c11-py2.7.egg Traceback (most recent call last): File "<string>", line 1, in <module> zipimport

Post install script after installing a wheel

人盡茶涼 提交于 2019-11-26 17:00:30
问题 Using from setuptools.command.install import install , I can easily run a custom post-install script if I run python setup.py install . This is fairly trivial to do. Currently, the script does nothing but print some text but I want it to deal with system changes that need to happen when a new package is installed -- for example, back up the database that the package is using. I want to generate the a Python wheel for my package and then copy that and install it on a a set of deployment

What is the official “preferred” way to install pip and virtualenv systemwide?

醉酒当歌 提交于 2019-11-26 16:59:50
Is it this, which people seem to recommend most often: $ sudo apt-get install python-setuptools $ sudo easy_install pip $ sudo pip install virtualenv Or this, which I got from http://www.pip-installer.org/en/latest/installing.html : $ curl -O https://github.com/pypa/virtualenv/raw/master/virtualenv.py $ python virtualenv.py my_new_env $ . my_new_env/bin/activate (my_new_env)$ pip install ... Or something entirely different? Tal Weiss If you can install the latest Python (2.7.9 and up) Pip is now bundled with it. See: https://docs.python.org/2.7//installing/index.html If not : Update (from the

setup_requires with Cython?

纵然是瞬间 提交于 2019-11-26 16:27:13
问题 I'm creating a setup.py file for a project with some Cython extension modules. I've already gotten this to work: from setuptools import setup, Extension from Cython.Build import cythonize setup( name=..., ..., ext_modules=cythonize([ ... ]), ) This installs fine. However, this assumes Cython is installed. What if it's not installed? I understand this is what the setup_requires parameter is for: from setuptools import setup, Extension from Cython.Build import cythonize setup( name=..., ...,

pip install dependency links

限于喜欢 提交于 2019-11-26 14:28:55
问题 I am using python version 2.7 and pip version is 1.5.6 . I want to install extra libraries from url like a git repo on setup.py is being installed. I was putting extras in install_requires parameter in setup.py . This means, my library requires extra libraries and they must also be installed. ... install_requires=[ "Django", .... ], ... But urls like git repos are not valid string in install_requires in setup.py . Assume that, I want to install a library from github. I have searched about

Installing SetupTools on 64-bit Windows

孤街浪徒 提交于 2019-11-26 14:01:01
I'm running Python 2.7 on Windows 7 64-bit, and when I run the installer for setuptools it tells me that Python 2.7 is not installed. The specific error message is: `Python Version 2.7 required which was not found in the registry` My installed version of Python is: `Python 2.7 (r27:82525, Jul 4 2010, 07:43:08) [MSC v.1500 64 bit (AMD64)] on win32` I'm looking at the setuptools site and it doesn't mention any installers for 64-bit Windows. Have I missed something or do I have to install this from source? Apparently (having faced related 64- and 32-bit issues on OS X) there is a bug in the

Reference requirements.txt for the install_requires kwarg in setuptools setup.py file

烂漫一生 提交于 2019-11-26 12:34:03
问题 I have a requirements.txt file that I\'m using with Travis-CI. It seems silly to duplicate the requirements in both requirements.txt and setup.py , so I was hoping to pass a file handle to the install_requires kwarg in setuptools.setup . Is this possible? If so, how should I go about doing it? Here is my requirements.txt file: guessit>=0.5.2 tvdb_api>=1.8.2 hachoir-metadata>=1.3.3 hachoir-core>=1.3.3 hachoir-parser>=1.3.4 回答1: You can flip it around and list the dependencies in setup.py and

How to Bootstrap numpy installation in setup.py

纵饮孤独 提交于 2019-11-26 12:11:13
问题 I have a project which has a C extension which requires numpy. Ideally, I\'d like whoever downloads my project to just be able to run python setup.py install or use one call to pip . The problem I have is that in my setup.py I need to import numpy to get the location of the headers, but I\'d like numpy to be just a regular requirement in install_requires so that it will automatically be downloaded from the Python Package Index. Here is a sample of what I\'m trying to do: from setuptools

Explain Python entry points?

心不动则不痛 提交于 2019-11-26 11:31:20
I've read the documentation on egg entry points in Pylons and on the Peak pages, and I still don't really understand. Could someone explain them to me? Brandon Rhodes An "entry point" is typically a function (or other callable function-like object) that a developer or user of your Python package might want to use, though a non-callable object can be supplied as an entry point as well (as correctly pointed out in the comments!). The most popular kind of entry point is the "console_script" entry point, which points to a function that you want made available as a command-line tool to whoever

How can I make setuptools install a package that&#39;s not on PyPI?

杀马特。学长 韩版系。学妹 提交于 2019-11-26 11:03:33
I've just started working with setuptools and virtualenv. My package requires the latest python-gearman that is only available from GitHub. The python-gearman version that's on PyPI is an old one. The Github source is setuptools-compatible, i.e. has setup.py, etc. Is there a way to make setuptools download and install the new version instead of looking for it on PyPI and installing the old one? FYI, the new python-gearman is http://github.com/mtai/python-gearman PJ Eby The key is to tell easy_install where the package can be downloaded. In this particular case, it can be found at the url http: