How to use Python "easy_install" on Windows ... it's not that simple

After installing Python 2.7 on Windows XP, manually install %PATH% on python.exe (why doesn't the python installer do this?), And then install setuptools 0.6c11 (why doesn't the python installer do this?) And then manually setting %PATH% to easy_install.exe (why does the installer not?), I finally tried to install the python package with easy_install , but easy_install failed when it could not install the pywin32 package, which is dependent. How can I make easy_install work correctly in Windows XP? The following is the error:

  C: \> easy_install winpexpect
 Searching for winpexpect
 Best match: winpexpect 1.4
 Processing winpexpect-1.4-py2.7.egg
 winpexpect 1.4 is already the active version in easy-install.pth

 Using c: \ python27 \ lib \ site-packages \ winpexpect-1.4-py2.7.egg
 Processing dependencies for winpexpect
 Searching for pywin32> = 214
 Reading http://pypi.python.org/simple/pywin32/
 Reading http://sf.net/projects/pywin32
 Reading http://sourceforge.net/project/showfiles.php?group_id=78018
 No local packages or download links found for pywin32> = 214
 Best match: None
 Traceback (most recent call last):
   File "C: \ python27 \ scripts \ easy_install-script.py", line 8, in 
     load_entry_point ('setuptools == 0.6c11', 'console_scripts', 'easy_install') ()
   File "C: \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", line 1712, in main
     with_ei_usage (lambda:
   File "C: \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", line 1700, in with_ei_usage
     return f ()
   File "C: \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", line 1716, in 
     distclass = DistributionWithoutHelpCommands, ** kw
   File "C: \ python27 \ lib \ distutils \ core.py", line 152, in setup
     dist.run_commands ()
   File "C: \ python27 \ lib \ distutils \ dist.py", line 953, in run_commands
     self.run_command (cmd)
   File "C: \ python27 \ lib \ distutils \ dist.py", line 972, in run_command
     cmd_obj.run ()
   File "C: \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", line 211, in run
     self.easy_install (spec, not self.no_deps)
   File "C: \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", line 446, in easy_install
     return self.install_item (spec, dist.location, tmpdir, deps)
   File "C: \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", line 481, in install_item
     self.process_distribution (spec, dists [0], deps, "Using")
   File "C: \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", line 519, in process_distribution
     [requirement], self.local_index, self.easy_install
   File "C: \ python27 \ lib \ site-packages \ pkg_resources.py", line 563, in resolve
     dist = best [req.key] = env.best_match (req, self, installer)
   File "C: \ python27 \ lib \ site-packages \ pkg_resources.py", line 799, in best_match
     return self.obtain (req, installer) # try and download / install
   File "C: \ python27 \ lib \ site-packages \ pkg_resources.py", line 811, in obtain
     return installer (requirement)
   File "C: \ python27 \ lib \ site-packages \ setuptools \ command \ easy_install.py", line 434, in easy_install
     self.local_index
   File "C: \ python27 \ lib \ site-packages \ setuptools \ package_index.py", line 475, in fetch_distribution
     return dist.clone (location = self.download (dist.location, tmpdir))
 AttributeError: 'NoneType' object has no attribute 'clone'
+57
python windows easy-install
Oct 25 2018-10-25
source share
6 answers

One of the problems is that easy_install is configured to download and install .egg files or source distributions (contained in .tgz, .tar, .tar.gz, .tar.bz2 or .zip files). He does not know how to work with PyWin32 extensions because they are placed in a separate installer executable . You will need to download the appropriate PyWin32 installation file (for Python 2.7) and run it yourself. When you run easy_install again (if you installed it correctly, as in the Sergio instructions), you should make sure that your winpexpect package is installed correctly.

Since this is the open-source Windows we are talking about, it can often be a dirty combination of installation methods to get things working properly. However, easy_install is still better than manual editing configuration files.

+8
Oct 25 '10 at 16:10
source share
— -

If you are using the 64-bit version of Windows 7, then the solution is found here: http://pypi.python.org/pypi/setuptools

namely, you need to download a python script, run it, and then easy_install will work fine from the command line.

PS I agree with the original poster saying that this should work out of the box.

+23
Dec 06
source share

I also agree with the OP that all these things should come with Python already installed. I think we will have to deal with this until this day comes. Here is a solution that really worked for me:

easy_install is faster and easier

I hope this helps you or anyone with the same problem!

+9
Aug 01 '13 at 15:09
source share

Copy below script "ez_setup.py" from below url

https://bootstrap.pypa.io/ez_setup.py

And copy it to your location in Python

C: \ python27>

Run the command

C: \ python27? python ez_setup.py

This will install easy_install into the Scripts directory.

C: \ python27 \ Scripts

Run a simple installation from the Scripts directory>

C: \ Python27 \ Scripts> easy_install

+6
Nov 21 '14 at 9:02
source share

Firstly, he says that you already have this module installed. If you need to update it, you should do something like this:

easy_install -U packageName

Of course, easy_install does not work very well if the package has some C headers that need to be compiled and you do not have the right version of Visual Studio. You can try using pip or redistribute instead of easy_install and see if they work better.

+1
Oct. 25 '10 at 15:44
source share

If you are using Anaconda's Python distribution ,

you can install it via pip

pip install setuptools

and then execute it as a module

python -m easy_install

0
Nov 30 '17 at 6:07
source share



All Articles