Install pip3 for conda

Python2.6 was installed by default on my old centos server. Now I want to create a Python3 environment to install a special python3 module by conde

conda create -n py3 python=3.5.3
source activate py3

      

After activating py3, I am trying to install on air cushion using pip3 install hovercraft

, the shell says "command not found: pip3". At first I thought pip3 was installed from Python3, but the result was not the same.
So I can install it manually. The package gzip file was downloaded from python package index and installed using conda install --file hovercraft-2.3.tar.gz

. But that won't work.
Now I have two problems:

  1. how to install pip3 for virtual env create by conda?
  2. Is it possible to locally install python package index package in conda?
+9


source to share


2 answers


pip3 and pip will only matter when you are not using any environment managers like virualenv (or) conda. Now when you create a conda environment with python == 3.x pip will be equivalent to pip3.



+22


source


It is possible to run PIP3 from conda-env explicitly. Just activate your environment:

conda activate [MY-ENVIRONMENT]

      

and run:

/path/to/anaconda3/bin/pip3 install [PACKAGE]

      



to install packages into a pipeline using PIP3.

Alternatively use:

alias pip3 ='/path/to/anaconda3/bin/pip3'

      

and then run your commands as known via pip3.

0


source







All Articles