Forums

I can't install nothing with pip.

Tring to install crispy-forms and I get:

  pip install mysql-python==1.2.5

-error: could not create '/usr/local/lib/python2.7/dist-packages/crispy_forms': Permission denied

Trying to install mysql and I get:

Permission denied: '/usr/local/lib/python2.7/dist-packages/MySQL_python-1.2.4-py2.7.egg-info/installed-files.txt'

You need to add a --user argument or install to a virtualenv.

Can you explain me that, please?

About the --user argument

Run the pip command like this:

pip install --user mysql-python==1.2.5

the same happend with

sudo apt-get install python-dev libmysqlclient-dev

Right, you can't run apt-get on PythonAnywhere. Both of those packages are already installed, though.

so why do I get

2014-09-09 17:50:43,002 :django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named 'MySQLdb'

when I try to run my app

Because you're using Python 3 for your web app and MySQLdb does not exist for Python 3. There are instructions here for using MySQL with Python 3.

I'm frustrated I still can't run my site, now I get this

django.core.exceptions.ImproperlyConfigured: Module "django.contrib.auth.middleware" does not define a "SessionAuthenticationMiddleware" attribute/class

In my local the proyect is made with python 2.7 and django 1.7 I have change the version on django here to 1.7 but still doesn't work.

If you're using Python 2.7 and want to use Django 1.7, I recommend you try following these instructions. They're for creating a totally new Django app and for Django 1.6, but the difference for 1.7 and for using a web app that already exists should be pretty obvious.