Python: Difference between revisions

Jump to navigation Jump to search
no edit summary
(revise advice on where to create a virtual environment)
No edit summary
Line 50: Line 50:


<!--T:8-->
<!--T:8-->
With each version of Python, we provide the tool [http://pypi.python.org/pypi/virtualenv virtualenv]. This tool allows users to create virtual environments within which you can easily install Python packages. These environments allow one to install many versions of the same package, for example, or to compartmentalize a Python installation according to the needs of a specific project. Usually you should create your Python virtual environment(s) in your home directory, or in a project directory.  (See "Creating virtual environments inside of your jobs" below for a third alternative.)
With each version of Python, we provide the tool [http://pypi.python.org/pypi/virtualenv virtualenv]. This tool allows users to create virtual environments within which you can easily install Python packages. These environments allow one to install many versions of the same package, for example, or to compartmentalize a Python installation according to the needs of a specific project. Usually you should create your Python virtual environment(s) in your /home directory or in one of your /project directories.  (See "Creating virtual environments inside of your jobs" below for a third alternative.)


<!--T:9-->
<!--T:9-->
To create a virtual environment, ensure you have selected a Python version with <tt>module load python</tt> as shown above.  Then enter the following command, where <tt>ENV</tt> is the name of the empty directory containing your environment:
To create a virtual environment, ensure you have selected a Python version with <tt>module load python</tt> as shown above.  Then enter the following command, where <tt>ENV</tt> is the name of the directory containing your environment:
{{Command|virtualenv --no-download ENV}}
{{Command|virtualenv --no-download ENV}}


rsnt_translations
56,420

edits

Navigation menu