halfmoon7400 / test

github 사용
0 stars 0 forks source link

Conda environment (How to install packages through Pip into a Conda environment) #1

Open halfmoon7400 opened 5 years ago

halfmoon7400 commented 5 years ago

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

  1. Create your virtual environment with conda create --name virtual_env_name , replacing ‘virtual_env_name’ with the name of your virtual environment

  2. Switch to your virtual environment with source activate virtual_env_name , again replacing ‘virtual_env_name’ with the name of your virtual environment

  3. 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/ 👍

halfmoon7400 commented 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"

halfmoon7400 commented 5 years ago

conda create -n my_env python=3.6

source activate my_env <-on source deactivate my_env <-off

halfmoon7400 commented 5 years ago

install Build Essential sudo apt-get install build-essential -y

Soynlp https://github.com/lovit/soynlp