Postgres on Conda (Ubuntu 14.04)

Being new to Anaconda, I am having problems setting up a conda environment. What interests me is creating an environment for a django application with a postgres database. The following command creates the environment:

$ conda create -n django1.7-webdev python=3.4 django=1.7 postgresql=9.1

This second command activates the environment:

$ source activate django1.7-webdev

At this point, however, when I try to start psql, I get the following error:

$ psql
psql: could not connect to server: No such file or directory
    Is the server running locally and accepting
    connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

How to run PostgreSQL in a conda environment? The following command starts PostgreSQL installed outside the activated conda environment, which I do not want:

$ sudo service postgresql start
+4
source share
1 answer

All Articles