10

Trying to get pycrypto installed in Windows. At the command prompt, I type python setup.py build. Things start out ok, but when it gets to 'running build_configure', I get this error message and things come to a halt:

chmod not recognized as internal or external command

I tried downloading and installing chmod, but that didn't change anything.

Anyone have any suggestions? Thanks.

JimmyPena
  • 8,694
  • 6
  • 43
  • 64
AndroidDev
  • 20,466
  • 42
  • 148
  • 239
  • `chmod` is a Unix command. http://en.wikipedia.org/wiki/Chmod – Robert Harvey Jul 08 '12 at 05:47
  • Yes, I know. But I'm working in Windows, and I know that pycrypto can be installed on windows, so there must be a solution. Maybe I need to be working in MinGW or Cygwin? – AndroidDev Jul 08 '12 at 05:50
  • Have you seen [this article](http://www.razorvine.net/blog/user/irmen/article/2009-12-05/166)? Also https://www.google.com/#q=Building+pcrypto+on+Windows – Robert Harvey Jul 08 '12 at 05:51

5 Answers5

11

I was running this from a Windows cmd prompt. I ran it from MinGW and it got past this part.

AndroidDev
  • 20,466
  • 42
  • 148
  • 239
10

I found this answer to solve the issue by installing "Git for Windows" and adding the "C:\Program Files\Git\usr\bin" path to the system %PATH% environment variable.

It's work for me

2

You need to install msys package under MinGW

enter image description here

and add following entries in your PATH env variable.

  • C:\MinGW\bin
  • C:\MinGW\msys\1.0\bin [This is where you will find chmod executable]

Then run your command from normal windows command prompt.

Aniket Thakur
  • 66,731
  • 38
  • 279
  • 289
1

like people said before, chmod is a UNIX command. it is also available in gitbash. If you are using windows you need to understand that chmod 400 basically changes your permissions on the file.

and you can change the permissions on the UI like this:

  1. select .pem file -> right click -> properties
  2. Security > Advanced > Disable inheritance
  3. Remove all Users
  4. Add > Select a principal
  5. In "Enter the object name to select" type your Windows username > ok
  6. Give all permissions > ok > apply
Liraz Shaka Amir
  • 587
  • 9
  • 26
0

No, there's no chmod command in Windows.

Either use Explorer's properties page for the file, or from a command shell use the attrib or cacls commands.

Jamal Ashraf
  • 569
  • 6
  • 9