[pycrypto] chmod error in Windows 7, when trying to install

nod at nym.hush.com nod at nym.hush.com
Fri Sep 7 13:10:02 EDT 2012


I created a binary installer for the latest version of pycrypto if 
you would like it, let me know. If you don't trust meh bits(lul) 
then I have these notes from when I compiled pycrypto on windows:

Download the MinGW installer here: 
http://sourceforge.net/projects/mingw/files/Installer/mingw-get-
inst/mingw-get-inst-20120426/
Delete all references to -mno-cygwin in distutils\cygwinccompiler.py

>From within the pycrypto folder run: python setup.py build -c 
mingw32
Then run: python setup.py bdist_wininst
You will now have a compiled binary in: dist 

Run the binary on your host your ant pycrypto on and you should be 
all set.


On Wed, 05 Sep 2012 16:29:42 -0700 Andrew Cooper 
<andyhhp at gmail.com> wrote:
>On 06/09/2012 00:23, Philip Horger wrote:
>> As I understand it, compiling and setting PyCrypto up from 
>source on Windows
>> requires MinGW. It might also support Cygwin. But some sort of 
>UNIX-y layer to
>> work with as common ground.
>
>I could have sworn that I had managed in the past, but it appears 
>that I
>used pre-compiled for windows and did the building sensibly on 
>Linux.
>
>Apologies.
>
>~Andrew
>
>>
>> On Wed, Sep 5, 2012 at 4:21 PM, Andrew Cooper 
><andyhhp at gmail.com> wrote:
>>> On 05/09/2012 17:48, Mike Anderson wrote:
>>>> I'm using Windows 7 Ultimate, and trying to install pycrypto, 
>but
>>>> getting an error "'chmod' is not recognized as an internal or 
>external
>>>> command."
>>>>
>>>> It happens like so:
>>>>> pip install ssh
>>>>    ...
>>>> copying lib\Crypto\Signature\__init__.py -> build\lib.win32-
>2.7\Crypto\Signature
>>>>
>>>>
>>>> running build_ext
>>>>
>>>> running build_configure
>>>>
>>>> 'chmod' is not recognized as an internal or external command,
>>>>
>>>> operable program or batch file.
>>>>
>>>> Traceback (most recent call last):
>>>>
>>>>   File "<string>", line 1, in <module>
>>>>
>>>>   File "C:\Users\killer\build\pycrypto\setup.py", line 456, in 
><module>
>>>>
>>>>     core.setup(**kw)
>>>>
>>>>   File "C:\Python27\lib\distutils\core.py", line 152, in setup
>>>>
>>>>     dist.run_commands()
>>>>
>>>>   File "C:\Python27\lib\distutils\dist.py", line 953, in 
>run_commands
>>>>
>>>>     self.run_command(cmd)
>>>>
>>>>   File "C:\Python27\lib\distutils\dist.py", line 972, in 
>run_command
>>>>
>>>>     cmd_obj.run()
>>>>
>>>>   File "C:\Python27\lib\site-
>packages\setuptools\command\install.py", line 53, i
>>>> n run
>>>>
>>>>     return _install.run(self)
>>>>
>>>>   File "C:\Python27\lib\distutils\command\install.py", line 
>563, in run
>>>>
>>>>     self.run_command('build')
>>>>
>>>>   File "C:\Python27\lib\distutils\cmd.py", line 326, in 
>run_command
>>>>
>>>>     self.distribution.run_command(command)
>>>>
>>>>   File "C:\Python27\lib\distutils\dist.py", line 972, in 
>run_command
>>>>
>>>>     cmd_obj.run()
>>>>
>>>>   File "C:\Python27\lib\distutils\command\build.py", line 127, 
>in run
>>>>
>>>>     self.run_command(cmd_name)
>>>>
>>>>   File "C:\Python27\lib\distutils\cmd.py", line 326, in 
>run_command
>>>>
>>>>     self.distribution.run_command(command)
>>>>
>>>>   File "C:\Python27\lib\distutils\dist.py", line 972, in 
>run_command
>>>>
>>>>     cmd_obj.run()
>>>>
>>>>   File "C:\Users\killer\build\pycrypto\setup.py", line 251, in 
>run
>>>>
>>>>     self.run_command(cmd_name)
>>>>
>>>>   File "C:\Python27\lib\distutils\cmd.py", line 326, in 
>run_command
>>>>
>>>>     self.distribution.run_command(command)
>>>>
>>>>   File "C:\Python27\lib\distutils\dist.py", line 972, in 
>run_command
>>>>
>>>>     cmd_obj.run()
>>>>
>>>>   File "C:\Users\killer\build\pycrypto\setup.py", line 273, in 
>run
>>>>
>>>>     raise RuntimeError("chmod error")
>>>>
>>>> RuntimeError: chmod error
>>> This is because you are on windows and setup.py is trying to 
>run unix
>>> commands.
>>>
>>> To a cursory glance, it appears to be a bug in pycrypto's 
>setup.py  It
>>> should either provide a windows compatible way of performing 
>autoconf
>>> and friends (unlikely), or provide a windows alternative way of
>>> configuring stuff and conditionally invoke the correct one for 
>the system.
>>>
>>> ~Andrew
>>>
>>>> _______________________________________________
>>>> pycrypto mailing list
>>>> pycrypto at lists.dlitz.net
>>>> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto
>>> _______________________________________________
>>> pycrypto mailing list
>>> pycrypto at lists.dlitz.net
>>> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto
>> _______________________________________________
>> pycrypto mailing list
>> pycrypto at lists.dlitz.net
>> http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto
>
>_______________________________________________
>pycrypto mailing list
>pycrypto at lists.dlitz.net
>http://lists.dlitz.net/cgi-bin/mailman/listinfo/pycrypto



More information about the pycrypto mailing list