473,382 Members | 1,404 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

compile pycrypto on windows

Hi

I'm trying to compile pycrypto on windows. I've installed mingw and try to
run the command 'python setup.py build -c mingw32 install' and I get this
error:

$ python setup.py build -c mingw32 install
running build
running build_py
creating build
creating build\lib.win32-2.3
creating build\lib.win32-2.3\Crypto
copying .\test.py -> build\lib.win32-2.3\Crypto
copying .\__init__.py -> build\lib.win32-2.3\Crypto
creating build\lib.win32-2.3\Crypto\Hash
copying .\Hash\HMAC.py -> build\lib.win32-2.3\Crypto\Hash
copying .\Hash\MD5.py -> build\lib.win32-2.3\Crypto\Hash
copying .\Hash\SHA.py -> build\lib.win32-2.3\Crypto\Hash
copying .\Hash\__init__.py -> build\lib.win32-2.3\Crypto\Hash
creating build\lib.win32-2.3\Crypto\Cipher
copying .\Cipher\__init__.py -> build\lib.win32-2.3\Crypto\Cipher
creating build\lib.win32-2.3\Crypto\Util
copying .\Util\number.py -> build\lib.win32-2.3\Crypto\Util
copying .\Util\randpool.py -> build\lib.win32-2.3\Crypto\Util
copying .\Util\RFC1751.py -> build\lib.win32-2.3\Crypto\Util
copying .\Util\test.py -> build\lib.win32-2.3\Crypto\Util
copying .\Util\__init__.py -> build\lib.win32-2.3\Crypto\Util
creating build\lib.win32-2.3\Crypto\Protocol
copying .\Protocol\AllOrNothing.py -> build\lib.win32-2.3\Crypto\Protocol
copying .\Protocol\Chaffing.py -> build\lib.win32-2.3\Crypto\Protocol
copying .\Protocol\__init__.py -> build\lib.win32-2.3\Crypto\Protocol
creating build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\DSA.py -> build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\ElGamal.py -> build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\pubkey.py -> build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\qNEW.py -> build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\RSA.py -> build\lib.win32-2.3\Crypto\PublicKey
copying .\PublicKey\__init__.py -> build\lib.win32-2.3\Crypto\PublicKey
running build_ext
building 'Crypto.Hash.MD2' extension
creating build\temp.win32-2.3
creating build\temp.win32-2.3\Release
creating build\temp.win32-2.3\Release\src
c:\mingw\bin\gcc.exe -mno-cygwin -mdll -O -Wall -Isrc/ -Ic:\Python23\include
-Ic:\Python23\PC -c src/MD2.c -o build\temp.win32-2.3\Release\src\md2.o
writing build\temp.win32-2.3\Release\src\MD2.def
c:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.3\Release\sr
\md2/o build\temp.win32-2.3\Release\src\MD2.def -Lc:\Python23\libs -Lc
\Python23\PCBuild -lpython23 -o build\lib.win32-2.3\Crypto\Hash\MD2.pyd
build\temp.win32-2.3\Release\src\md2.o(.text+0x3e3):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x3eb):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x53c):MD2.c: undefined
reference to `_imp__PyType_Type'
---

can someone please help?

thanx
--
Haim
Jul 18 '05 #1
2 7734
Haim Ashkenazi <ha**@babysnakes.org> writes:
Hi

I'm trying to compile pycrypto on windows. I've installed mingw and try to
run the command 'python setup.py build -c mingw32 install' and I get this
error:

$ python setup.py build -c mingw32 install
running build
running build_py [snip] c:\mingw\bin\gcc.exe -mno-cygwin -shared -s build\temp.win32-2.3\Release\sr
\md2/o build\temp.win32-2.3\Release\src\MD2.def -Lc:\Python23\libs -Lc
\Python23\PCBuild -lpython23 -o build\lib.win32-2.3\Crypto\Hash\MD2.pyd
build\temp.win32-2.3\Release\src\md2.o(.text+0x3e3):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x3eb):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x53c):MD2.c: undefined
reference to `_imp__PyType_Type'
---

can someone please help?
Did you create libpythonXX.a ?
http://sebsauvage.net/python/mingw.html describes how to do that.

thanx
--
Haim


--
brainbot technologies ag
boppstrasse 64 . 55118 mainz . germany
fon +49 6131 211639-1 . fax +49 6131 211639-2
http://brainbot.com/ mailto:ra**@brainbot.com
Jul 18 '05 #2
ra**@brainbot.com wrote:
Haim Ashkenazi <ha**@babysnakes.org> writes:
Hi

I'm trying to compile pycrypto on windows. I've installed mingw and try
to run the command 'python setup.py build -c mingw32 install' and I get
this error:

$ python setup.py build -c mingw32 install
running build
running build_py

[snip]
c:\mingw\bin\gcc.exe -mno-cygwin -shared -s
build\temp.win32-2.3\Release\sr \md2/o
build\temp.win32-2.3\Release\src\MD2.def -Lc:\Python23\libs -Lc
\Python23\PCBuild -lpython23 -o build\lib.win32-2.3\Crypto\Hash\MD2.pyd
build\temp.win32-2.3\Release\src\md2.o(.text+0x3e3):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x3eb):MD2.c: undefined
reference to `_imp___Py_NoneStruct'
build\temp.win32-2.3\Release\src\md2.o(.text+0x53c):MD2.c: undefined
reference to `_imp__PyType_Type' ---

can someone please help?


Did you create libpythonXX.a ?
http://sebsauvage.net/python/mingw.html describes how to do that.

thanx, that solved it.

Bye
--
Haim
Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Carmine Noviello | last post by:
Hi, I want to say first of all that I'm totally a newbie in cryptography world. Is there someone can show me a simple example on how to use PyCrypto lib and RSA to encrypt large text file? I'm...
0
by: Fuzzyman | last post by:
The location of the prebuilt windows installer for PyCypto 2.0 (for python 2.4) has changed. Apologies for any confusion, this is because of a website reorganisation at Voidspace. The new...
11
by: dirvine | last post by:
Does anyone know if pycrypto is active at all. I have been browsing groups etc. for some info and have found entries from 2003 (latest) regarding some bits I was looking for in particular reference...
13
by: luca72 | last post by:
Hello I have to make an easy operation but reading the pycrypto doc. a never see AES example I have to cript this key 'ea523a664dabaa4476d31226a1e3bab0' with the AES. Can you help me for make it...
2
by: Ning | last post by:
I'm trying to write an IM client which sends encrypted messages to the server. I tried to use pycrypto library, but when I came to 3DES cypher I was confused about the keysize to use. In the...
3
by: mirandacascade | last post by:
Operating system: Win XP Vsn of Python: 2.4 Situation is this: Required to calcluate a message digest. The process for calcluating the digest must use an SHA-256 algorithm. Questions: 1) Is...
5
by: mirandacascade | last post by:
Attempting to determine whether the PyCrypto package has the capability to perform AES256 encryption. I received the following C# snippet: CryptoProvider provider = new CryptoProvider();...
0
by: yaipa | last post by:
I snipped this bit of code out of Andrew Kuchling 'pyCrypto' test fixture. Having a need to XOR Binascii Hex strings in my current project, I found it very helpful to cut down on a bit of code...
1
by: cokofreedom | last post by:
I am really stuck presently, trying to install these on my Windows XP. I have downloaded easy_install and it is now in Python25\Scripts but none of the commands I have read in either program folder...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.