Jan-16-2018, 12:05 PM
(Jan-16-2018, 11:14 AM)jehoshua Wrote: Have been reading up on how to use the virtual environment with Python 3.6 and python3-venv , and it seems after the initial commandit's just
source bin/activate
after you have cd into environment folder.The
deactivate
to get out.Example:
# before location mint@mint ~ $ which python /home/mint/.pyenv/shims/python mint@mint ~ $ python -V Python 3.6.2 # Make environment and cd in mint@mint ~ $ python -m venv foo_env mint@mint ~ $ cd foo_env # Activate mint@mint ~/foo_env $ source bin/activate # Python and pip from environment is used (foo_env) mint@mint ~/foo_env $ which python /home/mint/foo_env/bin/python (foo_env) mint@mint ~/foo_env $ pip -V pip 9.0.1 from /home/mint/foo_env/lib/python3.6/site-packages (python 3.6) # Deactivate (foo_env) mint@mint ~/foo_env $ deactivate mint@mint ~/foo_env $