Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install SQLAlchemy on Ubuntu?

I want to install Python and SQLAlchemy on Ubuntu. This is my command:

sudo easy_install sqlalchemy

But it has failed, what should I do?

like image 223
user3410960 Avatar asked Mar 12 '14 13:03

user3410960


People also ask

How do I install SQLAlchemy?

The easiest way to install is by using Python Package Manager, pip. This utility is bundled with standard distribution of Python. Using the above command, we can download the latest released version of SQLAlchemy from python.org and install it to your system.

How do I know if SQLAlchemy is installed?

To check which version of sqlalchemy is installed, use pip show sqlalchemy or pip3 show sqlalchemy in your CMD/Powershell (Windows), or terminal (macOS/Linux/Ubuntu) to obtain the output major.

What is pip install flask-SQLAlchemy?

Flask-SQLAlchemy is an extension for Flask that adds support for SQLAlchemy to your application. It aims to simplify using SQLAlchemy with Flask by providing useful defaults and extra helpers that make it easier to accomplish common tasks.

Is SQLAlchemy a Python library?

SQLAlchemy is a library that facilitates the communication between Python programs and databases. Most of the times, this library is used as an Object Relational Mapper (ORM) tool that translates Python classes to tables on relational databases and automatically converts function calls to SQL statements.


2 Answers

Aha,sir,I can help you. First step,you should intall the MySql,like these:

sudo apt-get install mysql-server
sudo apt-get install mysql-client
sudo apt-get install libmysqlclient15-dev

Second step,install the python-mysqldb:

sudo apt-get install python-mysqldb

Third step,install the easy_install:

sudo wget http://peak.telecommunity.com/dist/ez_setup.py
sudo python ez_setup.py

Forth step,install the MySQL-Python:

sudo easy_install MySQL-Python

Finally,sqlalchemy:

sudo easy_install SQLAlchemy
like image 168
Karl Doenitz Avatar answered Sep 25 '22 21:09

Karl Doenitz


sudo pip install flask-sqlalchemy

This installs the SQLAlchemy package for Flask.

like image 25
connelblaze Avatar answered Sep 24 '22 21:09

connelblaze