0

I have been trying to install pypol in cygwin. But when I do setup where I have to type python setup.py install then it displays an error as the following:

Traceback (most recent call last):

File "setup.py", line 1, in

from setuptools import find_packages, setup, Command

File "/cygdrive/c/pypol_-0.4/setuptools/init.py", line 2, in

from setuptools.extension import Extension, Library

File "/cygdrive/c/pypol_-0.4/setuptools/extension.py", line 2, in

from setuptools.dist import _get_unpatched

File "/cygdrive/c/pypol_-0.4/setuptools/dist.py", line 6, in

from setuptools.command.install import install

File "/cygdrive/c/pypol_-0.4/setuptools/command/init.py", line 8, in

from setuptools.command import install_scripts

File "/cygdrive/c/pypol_-0.4/setuptools/command/install_scripts.py", line 3, in

from pkg_resources import Distribution, PathMetadata, ensure_directory

ImportError: No module named pkg_resourceserror

Its clear that some of the modules are missing in my setuptools but I installed the setuptools again and they are still not there. How do I get out of this problem? Please help. Thank you.

zingy
  • 811
  • 9
  • 19
  • 35

1 Answers1

0

What is causing ImportError: No module named pkg_resources after upgrade of Python on os X?

is informative. It suggests that you're invoking the wrong version of python. Do you already have python installed under Windows?

If you do have another version of Python (you can probably check under cygwin with which python) make sure that you're invoking the right one, which is most easily done by putting its binary path at the beginning of your PATH environmental variable in your ~/.bashrc or similar.

Then, re-install setuptools with the correct python, and everything should go smoothly.

Really, the linked answer tells you all you need to know, except it's talking about multiple versions on OSX rather than Windows.

I see that none of your previous questions have an accepted answer, please click the check mark next to the best answer to your question.

Community
  • 1
  • 1
agf
  • 171,228
  • 44
  • 289
  • 238
  • Thank you very much. Yes I have python2.7 installed. I would recheck everything and see what happens. – zingy Jul 25 '11 at 11:38
  • I found out that setup.py will try to invoke the setuptools module which is located in the lib directory of python. Since it is located somewhere else the error appears as$ python setup.py install Traceback (most recent call last): File "setup.py", line 1, in from setuptools import find_packages, setup, Command ImportError: No module named setuptools – zingy Jul 25 '11 at 11:57
  • Sorry I could not edit my post. I hope it is understood. I set up the environment variables for setup tools but it does not work. So do I copy the folder to this directory of pypol to install it? Thanks you. – zingy Jul 25 '11 at 12:00
  • It's not clear to me that you followed my instructions. If `python` is finding the wrong setuptools, you're probably using the __wrong copy of python__. Did you make sure that the one you're running is the cygwin one not the Windows one? If it is, then make sure you're running the cygwin one. Please edit your question to add the output of `which python` and put your errors there, formatted. – agf Jul 25 '11 at 12:05
  • I finally got what you were trying to explain. I am running a windows python so thats the reason it wasnt installing. I would have to install python for cygwin and then install it. Thank you very much – zingy Jul 25 '11 at 12:48