Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Notes/virtual.md
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
64 lines (46 sloc)
988 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Establish a virtual environment in local | |
1. Install virtualenv | |
```bash | |
pip3 install virtualenv virtualenvwrapper | |
``` | |
2. Modify your '.bashrc' | |
```bash | |
vim .bashrc | |
``` | |
- Virtualenvwrapper settings: | |
```bash | |
export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 | |
export WORKON_HOME=$HOME/.virtualenvs | |
export VIRTUALENVWRAPPER_VIRTUALENV=$HOME/.local/bin/virtualenv | |
source ~/.local/bin/virtualenvwrapper.sh | |
``` | |
3. Check your modifications | |
```bash | |
ll .virtualenvs/ | |
echo $WORKON_HOME | |
``` | |
4. Create a new environment and copy the created envo to create a similar one | |
```bash | |
mkvirtualenv jupyter --python=python3 | |
cpvirtualenv jupyter ase | |
workon jupyter | |
pip install sympy | |
pip install numpy | |
pip install matplotlib | |
pip install scipy | |
pip install jupyterlab | |
``` | |
5. Deactivate the environment | |
```bash | |
deactivate | |
``` | |
6. Remove the environment | |
```bash | |
rmvirtualenv juypter | |
``` | |
- important other python lines | |
```python | |
import numpy | |
print(numpy.__version__) | |
print(matplotlib.__version__) | |
``` |