Forums

How can I change some of my python module files?

Hi, I am trying to replace the default matplotlib finance.py file with a custom one I made, and I am unable to do it. Any ideas on how I can achieve this copy and replace? Below is a copy and paste of a few of my failed attempts. Thanks!

19:34 ~ $ cp -fr /home/Sentdex/finance.py /usr/local/lib/python2.7/dist-packages /matplotlib/finance.py cp: cannot remove â/usr/local/lib/python2.7/dist-packages/matplotlib/finance.pyâ : Permission denied

19:34 ~ $ sudo cp -fr /home/Sentdex/finance.py /usr/local/lib/python2.7/dist-pac kages/matplotlib/finance.py -bash: sudo: command not found

19:34 ~ $ cp /home/Sentdex/finance.py /usr/local/lib/python2.7/dist-packages/matplotlib/finance.py cp: cannot create regular file â/usr/local/lib/python2.7/dist-packages/matplotlib/finance.pyâ: Permission denied

I am new here too. I created a virtual environment and then was able to install whatever version of what ever module I wanted. Search for "pythonanywhere venv" on google or the forums and you will find all the info you need. I can't remember the exact procedure.

Chris

Here's a guide we wrote to how to set up a virtualenv for using a custom version of django:

https://www.pythonanywhere.com/wiki/VirtualEnvForNewerDjango