Skip to content
Advertisement

python 3.x no module named sqlalchemy after installation

I’m trying to install sqlalchemy to interact with mysql database for my python 3.x with ubuntu 12.04, but then when I import the sqlalchemy it says no module named sqlalchemy. This is what i did with installation:

JavaScript

Did I do something wrong?

Advertisement

Answer

By using apt-get you have installed sqlalchemy in the default directory for Ubuntu’s default Python 3, which is 3.2. If you search in the directory /usr/lib/python3/dist-packages you’ll find the sqlalchemy module (or just type locate sqlalchemy). However, this isn’t where a custom Python will look for its modules. You’ll need to download the source and compile it with the correct Python, something like /opt/python3.3/bin/python3.3 setup.py install in the source directory for sqlalchemy. See the instructions here: http://docs.python.org/3.3/install

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement