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:
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.
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.
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.
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With