2

I'm trying to install pystashop module. I have a Python 3.4 installed on Windows 7 64 bits.

When I try pip install pystashop I get this error:

Collecting pystashop
Downloading pystashop-0.4.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
    File "<string>", line 20, in <module>
    File "C:\Users\Me\AppData\Local\Temp\pip-build-zyt3yyca\pystashop\setup.py", line 12, in <module>
    execfile(os.path.join('pystashop', 'version.py'))
NameError: name 'execfile' is not defined

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\Users\Me\AppData\Local\Temp\pip-build-zyt3yyca\pystashop

how can I solve this?

ADD:

I tryed to install and run 'python ez_setup.py' and after run 'easy_install pip' but with no success. Still getting the same error.

Andy Schmitt
  • 441
  • 1
  • 6
  • 23
  • Possible duplicate of [Can't install via pip because of egg\_info error](http://stackoverflow.com/questions/17886647/cant-install-via-pip-because-of-egg-info-error) – Stawros Dec 17 '15 at 10:41

1 Answers1

0

execfile is a standard library builtin in Python 2. It was removed in Python 3, which means that pystashop does not support Python 3. You should try contacting the developer(s) and request Python 3 support, and in the meantime see if you can get by with Python 2.

You can attempt to remedy the situation yourself by cloning the GitHub repo, making changes, and installing with python3 setup.py install, but there's no guarantee that it will work properly. The offending code seems to be here:

execfile(os.path.join('pystashop', 'version.py'))

You can replace this with the following:

exec(open(os.path.join('pystashop','version.py')).read())

This will provide the expected functionality. From a cursory glance over the code, everything else appears to be compatible with Python 3, though I may have missed something.