PyCrypto Refuses To Install

gudenau

Largely ignored
OP
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,358
Country
United States
I have been trying to install PyCrypto for the entire day, but failing.

pip install pycrypto fails with this:
Code:
    winrand.c
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(28): error C2061: syntax error: identifier 'intmax_t'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(29): error C2061: syntax error: identifier 'rem'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(29): error C2059: syntax error: ';'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(30): error C2059: syntax error: '}'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(32): error C2061: syntax error: identifier 'imaxdiv_t'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(32): error C2059: syntax error: ';'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(42): error C2143: syntax error: missing '{' before '__cdecl'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(43): error C2146: syntax error: missing ')' before identifier '_Number'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(43): error C2061: syntax error: identifier '_Number'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(43): error C2059: syntax error: ';'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(44): error C2059: syntax error: ')'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(47): error C2143: syntax error: missing '{' before '__cdecl'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(48): error C2146: syntax error: missing ')' before identifier '_Numerator'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(48): error C2061: syntax error: identifier '_Numerator'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(48): error C2059: syntax error: ';'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(48): error C2059: syntax error: ','
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(50): error C2059: syntax error: ')'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(52): error C2143: syntax error: missing '{' before '__cdecl'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(58): error C2143: syntax error: missing '{' before '__cdecl'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(65): error C2143: syntax error: missing '{' before '__cdecl'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(71): error C2143: syntax error: missing '{' before '__cdecl'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(78): error C2143: syntax error: missing '{' before '__cdecl'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(84): error C2143: syntax error: missing '{' before '__cdecl'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(91): error C2143: syntax error: missing '{' before '__cdecl'
    C:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt\inttypes.h(97): error C2143: syntax error: missing '{' before '__cdecl'
    error: command 'D:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

Any idea how to fix this?
 

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,076
Country
United States
The Windows version is python, two installs can not easily coexist.
Yes they can. You just have to make sure your PATH directive stays consistent. This applies to all operating systems, not just Windows. Python versions install themselves to their own directories, and create a unique PATH directive for each installation, so it really isn't anything more than a ten second hassle to update your PATH.
 

gudenau

Largely ignored
OP
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,358
Country
United States
Yes they can. You just have to make sure your PATH directive stays consistent. This applies to all operating systems, not just Windows. Python versions install themselves to their own directories, and create a unique PATH directive for each installation, so it really isn't anything more than a ten second hassle to update your PATH.
Except for the part where they are all python.exe.
 

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,076
Country
United States
Except for the part where they are all python.exe.
They're not. Each Python executable is appended with their version number (python27.exe, python36.exe, etc.), and your PATH is what makes it possible to call it as just "python". By doing so though, you're calling the latest version that's installed (until you change your PATH). This is why you have to specify the version either in the command or the script you're using.
 

Sono

cripple piss
Developer
Joined
Oct 16, 2015
Messages
2,820
Trophies
2
Location
home
XP
9,305
Country
Hungary
They're not. Each Python executable is appended with their version number (python27.exe, python36.exe, etc.), and your PATH is what makes it possible to call it as just "python". By doing so though, you're calling the latest version that's installed (until you change your PATH). This is why you have to specify the version either in the command or the script you're using.

I don't see python27/python35 either :/

0755a86c95.png

153e383313.png

I have been trying to install PyCrypto for the entire day, but failing.

pip install pycrypto fails with this:
Code:
    winrand.c
    error: command 'D:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

Any idea how to fix this?

Why is it using MSVC? :/ I think it would be a better idea to compile with gcc. Google how to switch your default PyDist compiler to MinGW
 
Last edited by Sono,

Joom

 ❤❤❤
Member
Joined
Jan 8, 2016
Messages
6,067
Trophies
1
Location
US
Website
mogbox.net
XP
6,076
Country
United States
I don't see python27/python35 either :/

0755a86c95.png

153e383313.png



Why is it using MSVC? :/ I think it would be a better idea to compile with gcc. Google how to switch your default PyDist compiler to MinGW
Oh ok, they changed it on Windows. Regardless, your PATH can be modified to specify Python 2 and 3's locations respectively. This will allow you to call them as either python2 or python3 (or whatever you set in your PATH).
 

gudenau

Largely ignored
OP
Member
Joined
Jul 7, 2010
Messages
3,882
Trophies
2
Location
/dev/random
Website
www.gudenau.net
XP
5,358
Country
United States
Oh ok, they changed it on Windows. Regardless, your PATH can be modified to specify Python 2 and 3's locations respectively. This will allow you to call them as either python2 or python3 (or whatever you set in your PATH).
I still do not understand how that would work, the PATH is only "look here for executables", has nothing to do with the name of the executable.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • SylverReZ @ SylverReZ:
    @Maximumbeans, I'm doing alright, thanks.
    +1
  • Maximumbeans @ Maximumbeans:
    That must be rough. Productive I'm sure but hard to balance with daily life
    +1
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Indeed. I've been working on getting this Infecutus chip to work on my PS2. But after soldering, I realised that a plastic piece was missing from the power ribbon cable to the power and eject buttons.
  • SylverReZ @ SylverReZ:
    Now I could go with soldering the contacts from the cable to the connector on the mobo, but doesn't sound like a good permanent solution.
  • Maximumbeans @ Maximumbeans:
    Man, that's beyond my brain :rofl: I'm no good with hardware for now. I'd like to get into hardmods in future though
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Maybe start practice soldering. Get a cheap-ass soldering iron and follow some good YouTube tutorials.
    +1
  • SylverReZ @ SylverReZ:
    Least my experience has gotten better than over a decade ago. My iron would constantly bump into components and break them.
  • Maximumbeans @ Maximumbeans:
    Sounds good. I actually did soldering but like 16 years ago for school so uuuuh probably rusty haha
  • SylverReZ @ SylverReZ:
    @Maximumbeans, Same here. I did soldering at school from a teacher who I honestly liked since he had plenty of good electronics experience.
    +1
  • Maximumbeans @ Maximumbeans:
    I wish I could play chess well
    +1
  • Maximumbeans @ Maximumbeans:
    Useless but a true art
    +1
  • SylverReZ @ SylverReZ:
    @Maximumbeans, I had a friend who had a glass chess set for their birthday.
  • SylverReZ @ SylverReZ:
    It was like all clear and fancy. Tbf I'm not too experienced with chess, but would like to learn someday.
  • Maximumbeans @ Maximumbeans:
    That sounds really cool
  • Maximumbeans @ Maximumbeans:
    I know the basics but no strategy at all :rofl:
    +1
  • Veho @ Veho:
    Watch chess streamers on Twitch and you'll pick up a thing or two.
    +1
  • Veho @ Veho:
    Not to mention there's an infinite number of chess games for every possible platform.
    +1
  • DinohScene @ DinohScene:
    just play it, get beaten a few times and start dominating
    +1
  • K3Nv2 @ K3Nv2:
    Nude chess is best
    +1
  • DinohScene @ DinohScene:
    strip checkers > nude chess
    +1
  • K3Nv2 @ K3Nv2:
    Nude checkers get jumped
    +1
  • SylverReZ @ SylverReZ:
    @Veho, I guess you'd pick up something while watching tub streams.
  • SylverReZ @ SylverReZ:
    @K3Nv2, Dick fights. :tpi:
  • Veho @ Veho:
    Turkish olive oil wrestling.
    +1
    Veho @ Veho: Turkish olive oil wrestling. +1