├── .gitignore ├── Readme.md ├── requirement.txt └── setup.sh /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | **The instruction to setup a virtual environment** 2 | 3 | We usually work on different projects with different libraries, 4 | even with different versions of same libraries. Therefore, we should 5 | use virtual environments.
6 | Each project works on a specific virtual environment. 7 | 8 | Set execute permission to *setup.sh*, then run it 9 | ```commandline 10 | chmod +x setup.sh 11 | ./setup.sh 12 | ``` 13 | 14 | 15 | Add the below lines to ~/.profile 16 | ``` 17 | # virtualenv and virtualenvwrapper 18 | export WORKON_HOME=$HOME/.virtualenvs 19 | export VIRTUALENVWRAPPER_PYTHON=/usr/bin/python3 20 | source /usr/local/bin/virtualenvwrapper.sh 21 | ``` 22 | 23 | similarly, add these lines to ~/.bashrc 24 | ``` 25 | export WORKON_HOME=~/.virtualenvs 26 | VIRTUALENVWRAPPER_PYTHON='/usr/bin/python3' 27 | source /usr/local/bin/virtualenvwrapper.sh 28 | ``` 29 | Execute these commands: 30 | ```commandline 31 | source ~/.profile 32 | source ~/.bashrc 33 | ``` 34 | 35 | Now, we're going to create a virtual environment: 36 | ``` 37 | mkvirtualenv imrc -p python3 38 | ``` 39 | (__*imrc*__ is the name of your environment) 40 | 41 | To work on the new environment, execute the command: 42 | ```commandline 43 | workon imrc 44 | ``` 45 | 46 | Now, you are in the virtual environment named *imrc*, you should 47 | install essential libraries in the environment for our work. 48 | The libraries are listed in the *requirement.txt* file, you can 49 | modify (add/delete) libraries that you don't need to use.
50 | Obviously, you can install any libraries whenever you want. 51 | Run the command to install libraries listed in the *requirement.txt*: 52 | ```commandline 53 | pip install -r requirement.txt 54 | ``` 55 | 56 | Now, you can work with the essential libs. 57 | To check the libraries that are installed in your environment, run: 58 | ```commandline 59 | pip list 60 | ``` 61 | 62 | Thank you. -------------------------------------------------------------------------------- /requirement.txt: -------------------------------------------------------------------------------- 1 | jupyter 2 | albumentations 3 | cnn-finetune 4 | easydict 5 | efficientnet-pytorch 6 | h5py 7 | httplib2 8 | imageio 9 | imgaug 10 | Markdown 11 | matplotlib 12 | notebook 13 | numba 14 | numpy 15 | opencv-python 16 | opencv-python-headless 17 | pandas 18 | Pillow 19 | pip 20 | pretrainedmodels 21 | progress 22 | protobuf 23 | ptyprocess 24 | qtconsole 25 | requests 26 | scikit-image 27 | scikit-learn 28 | scipy 29 | setuptools 30 | tensorboard 31 | tensorboard-plugin-wit 32 | torch 33 | torchsummary 34 | torchvision 35 | tqdm 36 | urllib3 37 | virtualenv 38 | virtualenv-clone 39 | virtualenvwrapper 40 | wheel 41 | xlrd 42 | xmltodict 43 | yacs 44 | wget 45 | -------------------------------------------------------------------------------- /setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | sudo apt-get update && sudo apt-get upgrade 3 | sudo apt-get install build-essential cmake unzip pkg-config 4 | sudo apt-get install libjpeg-dev libpng-dev libtiff-dev 5 | sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev 6 | sudo apt-get install libxvidcore-dev libx264-dev 7 | sudo apt-get install libgtk-3-dev 8 | sudo apt-get install libcanberra-gtk* 9 | sudo apt-get install libatlas-base-dev gfortran 10 | sudo apt-get install python3-dev 11 | sudo pip3 install virtualenv virtualenvwrapper --------------------------------------------------------------------------------