python-binance icon indicating copy to clipboard operation
python-binance copied to clipboard

cl.exe failed with exit status 2/-1073741701

Open Jarmahent opened this issue 8 years ago • 65 comments

When trying to install python-binance using pip I get this error:

C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DWIN32=1 "-Ic:\program files\python37\include" "-Ic:\program files\python37\include" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /Tcsrc/twisted/test/raiser.c /Fobuild\temp.win-amd64-3.7\Release\src/twisted/test/raiser.obj error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status -1073741701

Command ""c:\program files\python37\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\Kevin\\AppData\\Local\\Temp\\pip-build-vbhp1s_d\\Twisted\\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\Kevin\AppData\Local\Temp\pip-yys0av0d-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Kevin\AppData\Local\Temp\pip-build-vbhp1s_d\Twisted\

Jarmahent avatar Jan 27 '18 03:01 Jarmahent

I have met this problem,too. I can't fix it. So, I choose to use Ubuntu instead of Windows @Jarmahent

yusail avatar Jan 27 '18 03:01 yusail

@yusail I have windows 10 on my laptop and I've successfully installed it there. I dont know exactly why.

Jarmahent avatar Jan 27 '18 03:01 Jarmahent

@Jarmahent I am having this problem too. Do you know what did you change to fix?

jyang0110 avatar Feb 04 '18 18:02 jyang0110

https://python-binance.readthedocs.io/en/latest/overview.html#installation

If you see errors building Twisted indication Microsoft Visual C++ is required you may need to install the Visual C++ Build Tools

tropo84 avatar Feb 05 '18 18:02 tropo84

@Jarmahent are you still having issues or did the info provided by @tropo84 resolve it?

sammchardy avatar Feb 13 '18 08:02 sammchardy

I am also being bothered with these issues. Install the newest VC build tools is not helpful.

evilying avatar Feb 14 '18 01:02 evilying

@sammchardy No installing the tools did not fix the issue.

Jarmahent avatar Mar 06 '18 02:03 Jarmahent

I am also having the same issue is any one know about this??

maijaz01 avatar Mar 09 '18 09:03 maijaz01

Refer to this link: https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted

Download the right whl package for you python version(if you have trouble knowing what version of python you have, just lunch the interpreter ), in my case it was python 3.6 32 bit

use pip to install the package, assuming that the file is in downloads folder : python -m pip install C:\Users\%USER%\Downloads\Twisted-17.9.0-cp36-cp36m-win32.whl

You can then try to install python-binance again usng pip

sedaradji avatar Mar 21 '18 07:03 sedaradji

Any one able to resolve issue. I am facing same issue.

dnyati avatar Mar 27 '18 07:03 dnyati

I was able to solve it See my previous comment.

sedaradji avatar Mar 27 '18 07:03 sedaradji

Thanks @Saledddar , i got the same issue. Using libs from lfd.uci.edu really helped.

Mari01d avatar Mar 28 '18 13:03 Mari01d

Thanks @Saledddar . Great job

chysam avatar Apr 04 '18 22:04 chysam

@Saledddar Seems to have the issue fixed, closing issue.

Jarmahent avatar Apr 06 '18 01:04 Jarmahent

it worked thank yo

Essbuisness avatar Jun 06 '18 03:06 Essbuisness

Saledddar, you didn't solve the issue at all, telling people to just download and install it from somewhere else with another program is not solving an issue at all. I'm trying to install the neopixels package, it's not on that page you linked that lists python packages, so I've still got the exact same problem.

Meurth avatar Jun 15 '18 09:06 Meurth

It works for Cartopy as well, but I agree that this is not a solution. It should work automatically.

danielsjf avatar Jun 17 '18 17:06 danielsjf

Hello guys The only real solution to this is within the traceback itself, visual studio c++ compiler must be installed on the machine. The reason why this issue is not as common on linux machine is that most distributions come with a c++ compiler.

As far as i know, you have to install visual studio in order to have the compiler (no other way around that), here is a link for a lightweight VS installation: https://blogs.msdn.microsoft.com/vcblog/2016/08/22/the-lightweight-visual-studio-15-installer/

I see some people arguing that using a precompiled whl is not a solution, for most popular packages it is, but for less known packages,you must have VS c++ compiler installed.

There is no automatic solution.

sedaradji avatar Jun 18 '18 04:06 sedaradji

This might be a stupid question, but why is there no compiler packaged with python or a dedicated package if this happens so often? Visual studio is quite big as an external dependency.

danielsjf avatar Jun 18 '18 07:06 danielsjf

Some python packages have parts written in c or c++, this is very common for packages where better performance is needed since python is interpreted and code in python is less efficient than a code that is written in c or c++.

As i said, python packages are delivered as source code, most developers sadly do not distribute their packages as binaries(.whl files that you will find in the link i shared above).

sedaradji avatar Jun 18 '18 13:06 sedaradji