开发者

Error when installing pycrypto

开发者 https://www.devze.com 2023-03-19 10:00 出处:网络
I\'m trying to install Fabric on my PC (with Windows + setuptools). It was giving me an error, since I have older version of pycrypto.

I'm trying to install Fabric on my PC (with Windows + setuptools). It was giving me an error, since I have older version of pycrypto.

When I was trying to install latest version I stumble upon "Unable to find vcvarsall.bat" error. I googled something about MinGW, so I installed that too. I've added it to my Windows PATH, but now i'm getting another error, which looks like this: "command 'gcc' failed: no such file or directory." What do i do now? Found something about gcc-mingw, which is some version of MinGW that could help?

Why is has to be so damn complicated :D.


New development. Managed to install pycrytpo and fabric, but still can't run anything in the latter. New error says: "ImportError: no module named win32api". Quick google search says something about PyWin, but easy_install can't find it and it looks like it's abandoned.开发者_如何转开发 Any ideas?


Well, it's so complicated because C (C++? Can't remember what they used at the moment, but I am pretty sure they used C) is much, much better at math than Python, so the math pieces of PyCrypto are all written in C. It does have a _slowmath module if the compiled versions aren't available, but it's name is telling... it is much slower.

gcc is the GNU Compiler Collection (<!-- an edit, I had thought it stood for GNU C Compiler, but apparently my knowledge was dated). It is a bit legendary, but apparently your version of Windows has not heard of it. First question though, have you closed the "DOS prompt" and restart it? (it's in quotes because the people at superuser once yelled at me because I did not sufficiently acknowledge its inferiority) Environment Variables in Windows do not update during a "DOS session" (or whatever it is supposed to be called).

If you have, chances are that it can be found inside of the MingW install director -- if there is a bin folder I'd check there first. If not, I would search for gcc.exe and make sure that it's path is part of PATH. Then,

If all else fails, you might be able to get more info on MingW here.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号