Why can I not create a wheel in python?

Here are the commands I am running: $ python setup.py bdist_wheel usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] …] or: setup.py –help [cmd1 cmd2 …] or: setup.py –help-commands or: setup.py cmd –help error: invalid command ‘bdist_wheel’ $ pip –version pip 1.5.6 from /usr/local/lib/python3.4/site-packages (python 3.4) $ python -c “import setuptools; print(setuptools.__version__)” 2.1 $ python –version … Read more

What’s the proper way to install pip, virtualenv, and distribute for Python?

Short Question What is the proper way to install pip, virtualenv, and distribute? Background In my answer to SO question 4314376, I recommended using ez_setup so that you could then install pip and virtualenv as follows: curl -O http://peak.telecommunity.com/dist/ez_setup.py sudo python ez_setup.py sudo easy_install pip sudo pip install virtualenv I originally pulled these instructions from … Read more

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

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 … Read more

No module named pkg_resources

I’m deploying a Django app to a dev server and am hitting this error when I run pip install -r requirements.txt: Traceback (most recent call last): File “/var/www/mydir/virtualenvs/dev/bin/pip”, line 5, in <module> from pkg_resources import load_entry_point ImportError: No module named pkg_resources pkg_resources appears to be distributed with setuptools. Initially I thought this might not be … Read more

Differences between distribute, distutils, setuptools and distutils2?

The Situation I’m trying to port an open-source library to Python 3. (SymPy, if anyone is wondering.) So, I need to run 2to3 automatically when building for Python 3. To do that, I need to use distribute. Therefore, I need to port the current system, which (according to the doctest) is distutils. The Problem Unfortunately, … Read more

How do I remove packages installed with Python’s easy_install?

Python’s easy_install makes installing new packages extremely convenient. However, as far as I can tell, it doesn’t implement the other common features of a dependency manager – listing and removing installed packages. What is the best way of finding out what’s installed, and what is the preferred way of removing installed packages? Are there any … Read more