0

Trying to install - pip install git+https://github.com/pennmem/ptsa_new

get this error:

ERROR: Command errored out with exit status 1:
     command: 'C:\Users\Nofar\anaconda3\envs\py3_env\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Nofar\\AppData\\Local\\Temp\\pip-req-build-39er9e6i\\setup.py'"'"'; __file__='"'"'C:\\Users\\Nofar\\AppData\\Local\\Temp\\pip-req-build-39er9e6i\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Nofar\AppData\Local\Temp\pip-pip-egg-info-3zy5mp_2'
         cwd: C:\Users\Nofar\AppData\Local\Temp\pip-req-build-39er9e6i\
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Nofar\AppData\Local\Temp\pip-req-build-39er9e6i\setup.py", line 34, in <module>
        os.environ["VS90COMNTOOLS"] = os.environ["VS140COMNTOOLS"]
      File "C:\Users\Nofar\anaconda3\envs\py3_env\lib\os.py", line 669, in __getitem__
        raise KeyError(key) from None
    KeyError: 'VS140COMNTOOLS'
    ----------------------------------------
WARNING: Discarding git+https://github.com/pennmem/ptsa_new.git. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

help please?

Kris
  • 8,680
  • 4
  • 39
  • 67
Nofar
  • 1
  • 1

1 Answers1

0

From the setup.py, when you are installing from source , its clearly written that you need Visual Studio C++ Redistributable to be installed in your system.

Relevant section in setup.py

# for windows install see http://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat
# for visual studio compilation you need to SET VS90COMNTOOLS=%VS140COMNTOOLS%
if sys.platform.startswith("win"):
    os.environ["VS90COMNTOOLS"] = os.environ["VS140COMNTOOLS"]

This answer explains the installation procedure for the required VSC version https://stackoverflow.com/a/18045219/995052.

Kris
  • 8,680
  • 4
  • 39
  • 67