Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

install pip3 for conda

Tags:

python

conda

Python2.6 was installed by default in my old centos server. Now I want to create a Python3 environment to install python3 specific module by conda

conda create -n py3 python=3.5.3
source activate py3

After activate the py3, I try to install hovercraft by pip3 install hovercraft, the shell tells "command not found: pip3". At first I thought pip3 was installed with Python3, but the result was not the case.
So I think I can install it manually. The package gzip file was downloaded from python package index, and install by conda install --file hovercraft-2.3.tar.gz. But it doesn't work.
Now I have two problems:

  1. how to install pip3 for virtual-env create by conda?
  2. Is it possible to install python package index downloaded package locally in conda?
like image 223
l0o0 Avatar asked Jun 05 '17 05:06

l0o0


People also ask

Can I use pip3 in conda?

If Python 3 and pip3 are installed outside of the Conda environment, then you can run pip3 from an Anaconda prompt just as you would from a Linux or Windows terminal or command line.

How do I use PIP with conda?

Use pip only after conda. install as many requirements as possible with conda, then use pip. pip should be run with --upgrade-strategy only-if-needed (the default) Do not use pip with the --user argument, avoid all “users” installs.

Can I run PIP3 from Anaconda?

Extra care needs to be taken with pip3 dependencies so that they do not conflict with Conda packages and dependencies. If Python 3 and pip3 are installed outside of the Conda environment, then you can run pip3 from an Anaconda prompt just as you would from a Linux or Windows terminal or command line.

What happens if I run Conda after Pip?

Running conda after pip has the potential to overwrite and potentially break packages installed via pip. Similarly, pip may upgrade or remove a package which a conda-installed package requires.

How do I install Pip in a 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.


1 Answers

pip3 and pip would make a difference only when you are not using any environment managers like virualenv (or) conda. Now as you are creating a conda environment which has python==3.x, pip would be equivalent to pip3.

like image 104
yottabytt Avatar answered Nov 01 '22 06:11

yottabytt