Is there any way to update Python on the Raspberry Pi (Wheezy) to Python 3.3?
Asked
Active
Viewed 1.6k times
1 Answers
17
You can install Python 3 easily:
$ sudo apt-get install python3
However: I wouldn't recommend settting this as the default version of Python.
If you're not already, starting using virtualenv, a tool for creating 'sandboxed' Python environments. Virtualenv will let you install multiple versions of Python without them conflicting with each other.
Installation is easy:
$ sudo pip install virtualenv
and creating a virtual environment in a folder is easy too:
$ virtualenv -p /usr/bin/python3 FOLDER
The -p flag tells you which version of Python to use. Then if you go into that folder:
$ cd FOLDER
you'll notice files like so:
$ ls
bin include lib
To activate this virtualenv type:
$ . bin/activate
The terminal line with change like so:
(FOLDER)$root@raspiberrypi: $
or something similar. The(FOLDER) part at the front tells you you're using the virtualenv.
To stop using that virtualenv just type:
deactivate
phalt
- 584
- 4
- 14