Skip to content
GitLab
  • Explore
  • Sign in
  • EDA Guides
  • eda-servers-guide
  • Wiki
  • virtualenv

virtualenv · Changes

Page history
Update virtualenv authored May 07, 2021 by Daniele Jahier Pagliari's avatar Daniele Jahier Pagliari
Show whitespace changes
Inline Side-by-side
virtualenv.md
View page @ a7ccddde
# Python Virtual Environments # Python Virtual Environments
TO DO Python Virtual Environments (or virtualenvs) are a mechanism to install Python packages not available system-wide, in user directories. They also allow you to have a different Python environment for each project, which is useful for example when you need different versions of the same package for different projects.
\ No newline at end of file
A complete guide on virtualenvs can be found [here](https://thepythonguru.com/python-virtualenv-guide/). Next, we report only some basic commands.
Create a Python3 virtualenv in the folder `./pyenv` (done once per project):
```
python3 -m venv --system-site-packages ./pyenv
```
Activate the virtualenv (done for each new shell from where you want to execute code belonging to the project):
```
source ./pyenv/bin/activate
```
Deactivate the virtualenv (the `deactivate` command is created when you activate your environment):
```
deactivate
```
After activating a virtualenv, you can install new packages without special permissions using `pip` (guide [here](https://packaging.python.org/tutorials/installing-packages/#installing-from-pypi)). Those packages will be only available within that virtualenv.
Clone repository
Home

Servers Information
Accounts
Connecting to the Servers
Storage Management and Quotas
Monitoring Resources
Software, Libraries and Data
  • Using Custom Software
  • Software Modules on Philae
  • Remote Code Deployment
  • Python Virtual Environments
  • EDA Technology Libraries
  • Shared Datasets
Miscellaneous Settings
  • Setting CUDA Drivers
  • Choosing which GPU to Use
  • Limiting the GPU Memory
Gitlab

Sidebar