Search code examples
djangopippythonanywhere

Pip having trying to uninstall appdirs while trying to install requirements.txt when deploying to pythonanywhere


I am trying to deploy my project on pythonanywhere. I have created my virtualenv and activated it but when I try to

"pip install -r requirements.txt"

it says

"Found existing installation: appdirs1.4.2 Uninstalling appdirs-1.4.2:"

and then gets a permission denied error.

What's going on and how do I fix it?

Full error in bpaste: https://bpaste.net/show/a7394c84c672


Solution

  • pip found appdirs-1.4.2 and gonna uninstall it and replace with appdirs-1.4.3 but failed on uninstallation — you don't have write access to /usr/local/lib/python2.7/dist-packages/. Run with sudo:

    sudo pip install -r requirements.txt