Skip to content

Commit

Permalink
python venv tutorial
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigovimieiro committed Mar 18, 2022
1 parent 92c8245 commit e4f0dcb
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Programming/Python/Useful_codes/Python_enviroment/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# How to create a new python environment:

These are the basic commands to add and install some packages:

1. `python3 -m venv science`
2. `. science/bin/activate`
3. `pip install -r science_requirements.txt`

** Note, **science** is just a name example, and **science_requirements** is just an example of commonly used python packages.

I usually add an alias to `.bashrc` (or whatever you use) to activate the python env:

```
# Python venv
alias science='source /home/user/.virtualenvs/science/bin/activate'
```

Reference: [Creating-virtual-environments](https://docs.python.org/3.3/library/venv.html#creating-virtual-environments)
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
h5py
numpy
matplotlib
pandas
pydicom
scikit-image
scipy
spyder
opencv-python
tqdm
tensorboard

0 comments on commit e4f0dcb

Please sign in to comment.