0

I am installing qark in my pc(Windows 7) for testing purpose. I have installed python 3.7.2 and pip 19.2.3. For next step, I have to install the requirement.txt file while installing, an error occurred(Command errored out with exit status 1:) full error I will give below.

I tried installing it again but error was same I don't know what should I do. Help me. Thank you

    ERROR: Command errored out with exit status 1:
     command: 'c:\users\hp\appdata\local\programs\python\python37\python.exe' -c
 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\HP\\AppData\\L
ocal\\Temp\\pip-install-6tjj0pbq\\cffi\\setup.py'"'"'; __file__='"'"'C:\\Users\\
HP\\AppData\\Local\\Temp\\pip-install-6tjj0pbq\\cffi\\setup.py'"'"';f=getattr(to
kenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"
'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --
egg-base pip-egg-info
         cwd: C:\Users\HP\AppData\Local\Temp\pip-install-6tjj0pbq\cffi\
    Complete output (27 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\HP\AppData\Local\Temp\pip-install-6tjj0pbq\cffi\setup.py",
line 120, in <module>
        if sys.platform == 'win32' and uses_msvc():
      File "C:\Users\HP\AppData\Local\Temp\pip-install-6tjj0pbq\cffi\setup.py",
line 98, in uses_msvc
        return config.try_compile('#ifndef _MSC_VER\n#error "not MSVC"\n#endif')

      File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\com
mand\config.py", line 227, in try_compile
        self._compile(body, headers, include_dirs, lang)
      File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\com
mand\config.py", line 133, in _compile
        self.compiler.compile([src], include_dirs=include_dirs)
      File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\_ms
vccompiler.py", line 345, in compile
        self.initialize()
      File "c:\users\hp\appdata\local\programs\python\python37\lib\distutils\_ms
vccompiler.py", line 238, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 185, in msvc14_get_vc_env
        return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 1228, in return_env
        self.OSIncludes,
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 963, in OSIncludes
        sdkver = self._sdk_subdir
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 1057, in _sdk_subdir
        ucrtver = self.si.WindowsSdkLastVersion
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 604, in WindowsSdkLastVersion
        self.WindowsSdkDir, 'lib'))
      File "c:\users\hp\appdata\local\programs\python\python37\lib\site-packages
\setuptools\msvc.py", line 809, in _use_last_dir_name
        for dir_name in reversed(os.listdir(path))
    FileNotFoundError: [WinError 3] The system cannot find the path specified: '
C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\PlatformSDK\\lib'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check th
e logs for full command output.
Siong Thye Goh
  • 3,518
  • 10
  • 23
  • 31
Salman Abbas
  • 174
  • 1
  • 2
  • 14
  • https://stackoverflow.com/questions/57581571/pip-install-error-microsoft-visual-c-10-0-is-required. – CristiFati Aug 27 '19 at 15:28
  • i have visual studio 2015 and i had installed the same file on ubantu which was successfully downloaded and i didn't have visual studio – Salman Abbas Aug 27 '19 at 15:38
  • Some env vars are not set correctly. My installation doesn't have a *PlatformSDK* *dir*. – CristiFati Aug 27 '19 at 15:41
  • for env vars i have set for python , pip , git and java is there any thing else i should have – Salman Abbas Aug 27 '19 at 15:46
  • Possible duplicate of https://stackoverflow.com/questions/51476784/how-to-install-visual-studio-2015-platformsdk-now?noredirect=1&lq=1 – tripleee Aug 28 '19 at 05:39

1 Answers1

1

I also had a similar problem in which the cmd/PowerShell told me that I was missing a version of Windows Visual C++, so I followed what was written on THIS site, so I didn't have this problem anymore (I also rebooted, for safety):

  1. Install using any ONE of these choices:
  2. Select: Workloads → C++ build tools.
  3. Install options: select only the “Windows 10 SDK” (assuming the computer is Windows 10). Optionally, if you want to use MSVC cl.exe C/C++ compiler from the command line, additionally select the C++ build tools, which takes an additional 2 GB disk space.


Moreover, to avoid problems I preferred to install Python 2.7.13 or 3.6 because they are the ones with which it has been tested (as indicated by the requirements on the github page).

After which (again according to the instructions) I installed QARK using:

pip install -r requirements.txt
pip install . --user


In the end, to make it work I had to put in the path of the environment variables these definitions: C:\Users\user\AppData\Roaming\Python\Scripts         (if you are using Python 2.x.x) C:\Users\utente\AppData\Roaming\Python\Python36\Scripts   (if you are using Python 3.x.x)

After that I didn't have any problems running it.
I hope I have been helpful!

Jack T
  • 315
  • 1
  • 6
  • 18