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

  • Home
  • SEARCH
  • 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 8185047
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T01:42:40+00:00 2026-06-07T01:42:40+00:00

I tried installing SQLAlchemy for Python 3.2 which I use with Eclipse/Pydev. A simple

  • 0

I tried installing SQLAlchemy for Python 3.2 which I use with Eclipse/Pydev. A simple test script fails

from sqlalchemy.engine import create_engine
engine=create_engine("mysql://user:password@server/database")

If I run it from Eclipse I get

Traceback (most recent call last):
  File "...\sqlalchemy.py", line 1, in <module>
    from sqlalchemy.engine import create_engine
  File "...\sqlalchemy.py", line 1, in <module>
    from sqlalchemy.engine import create_engine
ImportError: No module named engine

However I actually generated the import line with Ctrl-Shirt-O, so Eclipse found that automatically and knows about it. Also Pydev does not show any errors in the script.

If I try the same script in the interactive Pydev console I get

from sqlalchemy.engine import create_engine
engine=create_engine("mysql://user:password@server/database")
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "C:\Python32\lib\site-packages\sqlalchemy-0.7.8-py3.2.egg\sqlalchemy\engine \__init__.py", line 338, in create_engine
    return strategy.create(*args, **kwargs)
  File "C:\Python32\lib\site-packages\sqlalchemy-0.7.8-py3.2.egg\sqlalchemy\engine\strategies.py", line 64, in create
    dbapi = dialect_cls.dbapi(**dbapi_args)
  File "C:\Python32\lib\site-packages\sqlalchemy-0.7.8-py3.2.egg\sqlalchemy\connectors\mysqldb.py", line 52, in dbapi
    return __import__('MySQLdb')
ImportError: No module named MySQLdb

Do you have an idea how to get it work?

  • 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-07T01:42:42+00:00Added an answer on June 7, 2026 at 1:42 am

    Answer is simple: your main module is named sqlalchemy.py. This is a trap that was much more easier to fall in python 2 – naming your own module by the same name as a system module.

    At startup your sqlalchemy.py is loaded by python as the __main__ module, and when the first line runs, python reloads sqlalchemy.py as the module sqlalchemy; the second time the import line is run the python interpreter already finds sqlalchemy in sys.modules, but it does not contain the variable or module named engine.

    For easy fix rename sqlalchemy.py to for example satest.py. For more complete solution, organize your code in packages.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Eclipse to program in Java. I tried installing from this site
I tried installing extension from extension manager but no use. Can you help how
I downloaded eclipse 3.4.2 and tried installing tomcat plugin (version 3.2.1)for eclipse from sysdeo
I have created a small and simple android app. I tried installing it on
While installing the new eclipse indigo IDE I've tried to setup the tomcat server
I tried installing django-utils from source code from github and using pip. The installation
I currently have a simple app in the market, now I tried installing it
I tried installing my old ASPImage from server Objects in my new server, but
I'm not experienced in Python, and I need the requests module. I've tried installing
Possible Duplicate: Python import MySQLdb error - Mac 10.6 I've tried everything I can

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.