Answer the question
In order to leave comments, you need to log in
How to change python2.7 to python3.5?
I decided to deploy a site on pythonanywhere.com hosting via bash.
I do everything as it is written in the article
. I
registered everything as needed, but bash swears. Perhaps this is due to the fact that python2.7 is used according to the standard, and python3.5 is needed for my task, but I don’t know how to enable it so that it goes according to the standard.
Django project uploaded via git clone
Here is what bash gives me:
11:51 ~ $ ls
Django_blog README.txt
11:51 ~ $ cd Django_blog
11:51 ~/Django_blog (master)$ source virtualenv/bin/activate
(virtualenv) 11:51 ~/Django_blog (master)$ pip install django whitenoise
Requirement already satisfied (use --upgrade to upgrade): django in /usr/local/lib/python2.7/dist-packages
Collecting whitenoise
Using cached whitenoise-3.2.1-py2.py3-none-any.whl
Installing collected packages: whitenoise
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 317, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 742, in install
**kwargs
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 831, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 1032, in move_wheel_files
isolated=self.isolated,
File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 346, in move_wheel_files
clobber(source, lib_dir, True)
File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 317, in clobber
ensure_dir(destdir)
File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/usr/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/dist-packages/whitenoise'
(virtualenv) 11:52 ~/Django_blog (master)$
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question