1

Noob question here on Python using pip. I've installed pip using setuptools on a Win7 32-bit machine. I am not using virtualenv.

Now trying to install enum34 for use with dbf; I need enum34 as I have to work in Python 2.7 for use with ArcGIS 10.2. In PowerShell, I get the following returned no matter what command I try to use with pip, including the command 'list'. I've also tried with the Windows basic Command Prompt and got the same results.

Did pip not install correctly? Is there some other error?

Please let me know if I've included enough information.

PS C:\python27\arcgis10.2\scripts> .\pip install enum34

Traceback (most recent call last):

 File "C:\python27\arcgis10.2\scripts\pip-script.PY", line 9, in <module>
 1oad_entry_point('pip==l.5.6', 'console_scripts', 'pip')()
 File "build\bdist.win32\egg\pkg_resources.py", line 351, in load_entry_point
 Fi1e "build\bdist.win32\egg\pkg_resources.py", line 2363: in load_entry_point
 File "build\bdist.win32\egg\pkg_resources.py", line 2088, in load
 )
 File "C:\Python27\ArcGIS10.2\lib\site-packages\pip\__init__.py", line 10, in <module>
 from pip.util import get_installed_distributions, get_prog

....etc.

ElGavilan
6,96216 gold badges31 silver badges36 bronze badges
asked Aug 1, 2014 at 18:15
1
  • 1
    As the message says the most recent problem is last so please post the whole message! Commented Aug 1, 2014 at 18:17

2 Answers 2

2

Download get-pip.py and run it as Administrator. Pip should then be on your path, so you can just use pip install enum34 instead of .\pip install enum34. If that doesn't work, tell us the error message you get.

answered Aug 1, 2014 at 18:19
Sign up to request clarification or add additional context in comments.

3 Comments

Getting an error message when running get-pip.py. Unfortunately I can't post a screenshot of the error so I will do my best to type it in. File "get-pip.py", line 17474, in <module> main() File "get-pip.py", line 17466, in main bootstrap(tmpdir=tmpdir) File "get-pip.py", line 17406, in bootstrap import pip File "longpath_init_.py", line 10, in <module> etc. File "c:\Python27\ArcGis10.2\lib\re.py", line 190, in compile return _compile(pattern, flags) File "c:\Python27\ArcGis10.2\lib\re.py", line 242, in _compile raise error, v # invalid expression sre_constants.error: nothing to repeat
Seemed to have installed pip but getting an error when using it to install enum34. It looks much like the error I was getting when I ran get-pip.py. It ends with the messages: File "c:\Python27\ArcGis10.2\lib\re.py", line 190, in compile<cr>return _compile(pattern, flags)<cr>File "c:\Python27\ArcGis10.2\lib\re.py", line 242, in _compile<cr>raise error, v # invalid expression<cr>sre_constants.error: nothing to repeat
That's a Python bug. The regular expression was probably using "*", and Python was trying to repeat a null value. There's something wrong with your Regex file in Python (looks like it's corrupted). Can you reinstall Python?
1

My goto solution for python libraries on windows is

http://www.lfd.uci.edu/~gohlke/pythonlibs/

They have prebuilt binary installers for tons of projects. enum34 is available.

answered Aug 2, 2014 at 5:30

2 Comments

This seemed to work. I will test out enum34 and see if it's installed correctly. Thanks! I still want to get pip installed correctly so I am going to continue to comment on the other answers.
No problem. If I were you I'd install virtualenv from the site above. Nowadays I do almost all of my python work in virtualenvs. Once I got the hang of it (took almost no time at all) it's just so easy. One of the biggest benefits is you never have to worry about permissions, and you know everything lives in the virtualenv directory.

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.