Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8234817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:36:37+00:00 2026-06-07T18:36:37+00:00

I compiled and installed pycrypto 2.6 on Mac OSX Lion with Python 3.2 but

  • 0

I compiled and installed pycrypto 2.6 on Mac OSX Lion with Python 3.2 but when I try to run command

import Crypto.Cipher.AES

I get this problem

Traceback (most recent call last):
File "/Users/DaZzz/Documents/Python Workspace/Cryptography Coursera/W2PA.py", line 8, in <module>
import Crypto.Cipher.AES
File "/Library/Python/2.7/site-packages/Crypto/Cipher/AES.py", line 50, in <module>
from Crypto.Cipher import _AES
ImportError: dlopen(/Library/Python/2.7/site-packages/Crypto/Cipher/_AES.so, 2): Symbol not found: _PyInt_FromLong
Referenced from: /Library/Python/2.7/site-packages/Crypto/Cipher/_AES.so
Expected in: flat namespace
in /Library/Python/2.7/site-packages/Crypto/Cipher/_AES.so

By the way, I use eclipse with installed PyDev. I also tried to run it in IDLE but I got following error:

Traceback (most recent call last):
  File "<pyshell#1>", line 1, in <module>
    import Crypto.Cipher.AES
  File "/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/Crypto/Cipher/AES.py", line 50, in <module>
    from Crypto.Cipher import _AES
ImportError: cannot import name _AES

It should be emphasized that to run it in IDLE I copied directory with Crypto into the python path.

What am I doing wrong?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T18:36:38+00:00Added an answer on June 7, 2026 at 6:36 pm

    See the /Library/Python/2.7 in the messages? It appears you are actually running Python 2.7 here. You need to tell PyDev to use Python 3.2. And are you sure you used the Python 3.2 version of IDLE? There are separate IDLE’s for each version of Python. Try typing idle3.2 from the command line or, in the Finder, click on /Applications/Python 3.2/IDLE.app.

    Update: Works for me using the python.org 64-/32-bit Python 3.2.3 and Xcode 4.3 (you may need to create a symlink for /Developer to work around the change of SDK locations for Xcode 4.3).

    # for Xcode 4.3+ only
    $ [ ! -e /Developer ] && sudo ln -s Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer /Developer
    
    
    $ tar xf ./pycrypto-2.6.tar.gz
    $ cd ./pycrypto-2.6
    $ python3.2 setup.py install
    $ cd
    $ python3.2
    Python 3.2.3 (v3.2.3:3d0686d90f55, Apr 10 2012, 11:25:50) 
    [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import Crypto.Cipher.AES
    >>> Crypto.Cipher.AES.__file__
    '/Library/Frameworks/Python.framework/Versions/3.2/lib/python3.2/site-packages/Crypto/Cipher/AES.py'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I just compiled and installed mysqldb for python 2.7 on my mac os 10.6.
I have compiled and installed python 2.7 on my ubuntu lucid. But I am
I have successfully compiled a C-program by GCC on Mac with GD2 library installed
I've manually compiled and installed PHP 5.3.8 on my Linux box but php-config gives
I have compiled FreeImage from source and installed it. When I run sudo make
I compiled and installed OpenCV (last version from the SVN) on Mac Os X
Following this writeup ... The compiled binary seems to work fine, but the installed
Problem I freshly installed mono on OS X Lion, compiled and ran my first-ever
I have a machine with grep installed but option -R is not compiled-in and
I compiled and installed GCC 4.5.1 via MacPorts in my installation of Mac OS

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.