Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
vms:python:dev [2017/04/14 01:50]
admin [Virtualenvwrapper]
vms:python:dev [2017/05/31 01:48]
admin [Virtual Environments]
Line 62: Line 62:
  
 Virtual Environments are used to isolate python versions and package dependencies for each specific project. Virtual Environments are used to isolate python versions and package dependencies for each specific project.
 +
 +We'll begin by creating specific users for python:
 +<​Code:​bash>​
 +> adduser py2
 +...
 +<​password>​
 +...
 +> adduser py3
 +...
 +<​password>​
 +...
 +
 +# To act as py2:
 +> su py2 
 +</​Code>​
  
 We'll install ''​virtualenv''​ for User only in order to allow coexistence of Python2 and Python3. As the virtualenv binary will bear the same name for 2 & 3, we'll move them on the go: We'll install ''​virtualenv''​ for User only in order to allow coexistence of Python2 and Python3. As the virtualenv binary will bear the same name for 2 & 3, we'll move them on the go:
Line 72: Line 87:
 > nano ~/.bashrc > nano ~/.bashrc
 ADD: ADD:
-Python ​virtualenv +USER INSTALLED BINARIES [virtualenv(wrapper)] 
-alias virtualenv2="~/.local/​lib/​python2.7/bin/virtualenv"​+export PATH=$PATH:~/​.local/​bin/​
  
 > source ~/.bashrc > source ~/.bashrc
-virtualenv2 ​--version+virtualenv ​--version
 15.1.0 15.1.0
 </​Code> ​ </​Code> ​