abbass2 / pyqstrat

A fast, extensible, transparent python library for backtesting quantitative strategies.
BSD 3-Clause "New" or "Revised" License
353 stars 57 forks source link

Error 1181 while building from source #17

Closed arnabanimesh closed 4 years ago

arnabanimesh commented 4 years ago

I am receiving the same error across different versions all the way back to 0.3.8 saying:

LINK : fatal error LNK1181: cannot open input file 'z.lib'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\\Tools\\MSVC\\14.14.26428\\bin\\HostX86\\x64\\link.exe' failed with exit status 1181
  ----------------------------------------
  ERROR: Failed building wheel for pyqstrat
    ERROR: Command errored out with exit status 1:
     command: 'D:\Compilers\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\arnab\\AppData\\Local\\Temp\\pip-install-bv60uptc\\pyqstrat\\setup.py'"'"'; __file__='"'"'C:\\Users\\arnab\\AppData\\Local\\Temp\\pip-install-bv60uptc\\pyqstrat\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\arnab\AppData\Local\Temp\pip-record-vlh7z_6c\install-record.txt' --single-version-externally-managed --compile
         cwd: C:\Users\arnab\AppData\Local\Temp\pip-install-bv60uptc\pyqstrat\

The entire build log is mentioned here: Build Log

Note: I am using anaconda latest release and VS 2017

abbass2 commented 4 years ago

Hie

Try installing libzip via anaconda

Best,

Sal

On Nov 17, 2019, at 6:46 AM, Arnab Animesh Das notifications@github.com wrote:

 I am receiving the same error across different versions all the way back to 0.3.8 saying:

LINK : fatal error LNK1181: cannot open input file 'z.lib' error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\link.exe' failed with exit status 1181

ERROR: Failed building wheel for pyqstrat ERROR: Command errored out with exit status 1: command: 'D:\Compilers\Anaconda3\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\arnab\AppData\Local\Temp\pip-install-bv60uptc\pyqstrat\setup.py'"'"'; file='"'"'C:\Users\arnab\AppData\Local\Temp\pip-install-bv60uptc\pyqstrat\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record 'C:\Users\arnab\AppData\Local\Temp\pip-record-vlh7z_6c\install-record.txt' --single-version-externally-managed --compile cwd: C:\Users\arnab\AppData\Local\Temp\pip-install-bv60uptc\pyqstrat\

The entire build log is mentioned here: Build Log

Note: I am using anaconda latest release and VS 2017

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

arnabanimesh commented 4 years ago

I already installed libzip earlier. I believe the problem was with the following line:

CONDA_PREFIX or CONDA_PREFIX_1 environment variables not found for including and linking to boost header files.

I was using a normal Command Prompt earlier. I tried using Anaconda Powershell Prompt and it worked like a charm.

girishmithran commented 4 years ago

I had a similar issue. Adding ‘CONDA_PREFIX’ to environment with value as the path to your anaconda install fixed it.