Jay Gattuso
Jay Gattuso

Reputation: 4130

Python - Ubuntu install for SQLAlchemy not working

I'm trying to setup a ubuntu box so I can do some work, and I'm having a heck of a time trying to get SQLAlchemy installed.

I have tried pretty much everything I can find on tutorials etc, and the latest position I find myself in is:

easy_install SQLAchemy seems to work ok, and installs version 0.7.4 (as far as I can tell)

If I go into python and try import sqlalchemy I get no module named sqlalchemy I also found a script that lists all the modules on the version of python, and its not listed there.

I am brand new to Ubuntu, so I am feeling my way around in the dark a little bit. I'm on Python 2.7 32bit (fresh install) Ubuntu 12.04 (all up to date). Any suggestions?

EDIT: I looked in /usr/bin, and saw that there are three folders that might be relevant - python, python2 and python2.7 this might be relevant...

Upvotes: 6

Views: 12121

Answers (1)

mata
mata

Reputation: 69052

you could also use the version directly from the ubuntu repositories:

sudo apt-get install python-sqlalchemy # or python3-sqlalchemy

if you used sudo easy_install, then the packages usually get installed in /usr/local/lib/pythonX.X/. The problem could be that easy_install (and also pip) doesn't set the file premissions right, so everyting installed is only readable by root.

You can avoid this by using the --user option when installing, then the packages are installed in the user site directory (~/.local/lib/pythonX.X)

Upvotes: 12

Related Questions