Installing SetupTools on 64-bit Windows
Apparently (having faced related 64- and 32-bit issues on OS X) there is a bug in the Windows installer. I stumbled across this workaround, which might help - basically, you create your own registry value HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.6\InstallPath
and copy over the InstallPath value from HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\2.6\InstallPath
. See the answer below for more details.
If you do this, beware that setuptools may only install 32-bit libraries.
NOTE: the responses below offer more detail, so please read them too.
How do I set up Setuptools for Python 2.6 on Windows?
First Option - Online Installation (i.e. remaining connected to the Internet during the entire installation process):
- Download setuptools-0.6c9.tar.gz
- Use 7-zip to extract it to a folder(directory) outside your Windows Python installation folder
- Go the folder (refer step 2) and run ez_setup.py from the corresponding dos (command) prompt
- Ensure that your PATH includes the appropriate C:\Python2X\Scripts directory
Second Option:
- Download setuptools-0.6c9.tar.gz
- Download setuptools-0.6c9-py2.6.egg to a folder(directory) outside your Windows Python installation folder
- Use 7-zip to extract ez_setup.py in the same folder as setuptools-0.6c9-py2.6.egg
- Go to the corresponding dos prompt and run python ez_setup.py setuptools-0.6c9-py2.6.egg from the command prompt
- Ensure that your PATH includes the appropriate C:\Python2X\Scripts directory
Third Option (assuming that you have Visual Studio 2005 or MinGW on your machine)
- Download setuptools-0.6c9.tar.gz
- Use 7-zip to extract it to a folder(directory) outside your Windows Python installation folder
- Go the folder (refer step 2) and run python setup.py install from the corresponding dos (command) prompt
Please provide feedback.
Error in installing setuptools (unorderable types: str() NoneType())
I was able to solve my problem (on Win 8.1 64bit, Python 3.4.2) with the change suggested here:
https://bitbucket.org/pypa/setuptools/pull-request/122/ensure-py_version-and-platform-are-str-in/diff#chg-pkg_resources/init.py
Can't install setuptools (python)
- Open a command prompt (Start menu -> cmd.exe)
Navigate to the directory where ez_setup.py is saved, e.g.:
cd C:\Users\You\Downloads
Run it (C:\Python27\ should already be on your %PATH%; if it's not, add it -- see below):
python ez_setup.py
Read the output. If it worked, you should be able to install packages like so:
C:\Python27\Scripts\easy_install jinja2
Add the path to
easy_install
to your %PATH% so that you can use it easily from any directory:- Control Panel -> System -> Advanced system settings
- Click the
Environment variables...
button - Edit PATH and append
;C:\Python27\Scripts\
to the end (substitute your Python version) - Click OK. Note that changes to the PATH are only reflected in command prompts opened after the change took place.
If something goes wrong, the command prompt will remain open after the program finishes, so you'll be able to read the error and use it to resolve the problem.
Python 3: ImportError No Module named Setuptools
Your setup.py
file needs setuptools
. Some Python packages used to use distutils
for distribution, but most now use setuptools
, a more complete package. Here is a question about the differences between them.
To install setuptools
on Debian:
sudo apt-get install python3-setuptools
For an older version of Python (Python 2.x):
sudo apt-get install python-setuptools
Setting up pip in Windows 7 64-bit
I think during your attempts you have messed up your Python setup somehow. While I am sure that you can get things working with just the CPython installer from python.org (I and many others did this), I strongly recommend to start over (cleanly remove what you have so far) and install one of the Python distributions that have some more features, for example:
- ActivePython
- the Enthought Python Distribution (EPD) or
- Python(x,y).
They come with several additional packages installed, including pip. Their installer also sets up your Windows PATH properly. So, after running the installer, you can just go ahead, start cmd.exe
and run python
or pip install ...
The free version of EPD can be found here. I myself have made good experiences with EPD but also with Python(x,y). Here is a list of "plugins" that the standard Python(x,y) installer brings along. Note that for Windows both, EPD and Python(x,y), are only available as 32 Bit version ... however, ActivePython for Windows 64-bit is free (PyPM packages are not free for 64-bit). Depending on your needs, this might not be an issue.
Related Topics
How to Force a List to a Fixed Size
Python Mixed Integer Linear Programming
Rolling Mean on Pandas on a Specific Column
How to Match Any String from a List of Strings in Regular Expressions in Python
How Does Keras Calculate the Accuracy
How Does Python Importing Exactly Work
How to Check If a Column Exists in Pandas
File Read Using "Open()" VS "With Open()"
Why Does Python's _Import_ Require Fromlist
Passing Csrftoken with Python Requests
Tensorflow: How to Replace or Modify Gradient
Appending Item to Lists Within a List Comprehension