Open halfmoon7400 opened 5 years ago
install anaconda
int root account
cd /home/anaconda curl -O https://repo.anaconda.com/archive/Anaconda3-2018.12-Linux-x86_64.sh
in anaconda account bash Anaconda3-2018.12-Linux-x86_64.sh
global env
sudo vi /etc/profile ex) export DESKTOP=/mnt/c/Users/crpark/Desktop export C=/mnt/c export PATH="/home/anaconda/anaconda3/bin/":$PATH 전역 환경변수 설정됨 source /etc/profile 근데 안해도 되는듯
private env vi .bashrc export PATH="/home/anaconda/anaconda3/bin":$PATH source .bashrc
the type in shell "conda list"
conda create -n my_env python=3.6
source activate my_env <-on source deactivate my_env <-off
install Build Essential sudo apt-get install build-essential -y
source activate my_env conda install packageName <- installed in my_env But not All the Packages in AnacondaCloud so how to use pip in my_env locally
Create your virtual environment with conda create --name virtual_env_name , replacing ‘virtual_env_name’ with the name of your virtual environment
Switch to your virtual environment with source activate virtual_env_name , again replacing ‘virtual_env_name’ with the name of your virtual environment
Run conda install pip , which will install pip to your virtual environment directory
At this point you have two versions of pip installed; a global version and a version specific to your virtual environment. If you try to run pip install 'package_name' you’ll use the global version, which will install the package outside your virtual environment.
You need to use the version of pip inside your virtual environment. To do this you need to find the directory of your virtual environment, which will be somewhere like “/anaconda/envs/virtual_env_name/”. You can install packages into your virtual environment with /anaconda/envs/venv_name/bin/pip install package_name .
source from : https://www.puzzlr.org/install-packages-pip-conda-environment/ 👍