Skip to main content
deleted 3 characters in body
Source Link
quasoft
  • 5.5k
  • 2
  • 37
  • 38

Other answers show how to use pip with both 2.X and 3.X Python, but does not show how to handle the case of multiple Python distributions (eg. original Python and Anaconda Python).

I have a total of 3 Python versions: original Python 2.7 and Python 3.5 and Anaconda Python 3.5.

Here is how I install a package into:

  1. Original Python 3.5:

     /usr/bin/python3 -m pip install python-daemon
    
  2. Original Python 2.7:

     /usr/bin/python -m pip install python-daemon
    
  3. Anaconda Python 3.5:

     python3 -m pip install python-daemon
    

    or

     pip3 install python-daemon
    

    Simpler, as Anaconda overrides original Python binaries in user environment.

    Of course, installing in anaconda should be done with conda command, this is just an example.


Also, make sure that pip is installed for that specific python.You might need to manually install pip. This works in Ubuntu 16.04:

sudo apt-get install python-pip 

or

sudo apt-get install python3-pip

Other answers show how to use pip with both 2.X and 3.X Python, but does not show how to handle the case of multiple Python distributions (eg. original Python and Anaconda Python).

I have a total of 3 Python versions: original Python 2.7 and Python 3.5 and Anaconda Python 3.5.

Here is how I install a package into:

  1. Original Python 3.5:

     /usr/bin/python3 -m pip install python-daemon
    
  2. Original Python 2.7:

     /usr/bin/python -m pip install python-daemon
    
  3. Anaconda Python 3.5:

     python3 install python-daemon
    

    Simpler, as Anaconda overrides original Python binaries in user environment.

    Of course, installing in anaconda should be done with conda command, this is just an example.


Also, make sure that pip is installed for that specific python.You might need to manually install pip. This works in Ubuntu 16.04:

sudo apt-get install python-pip 

or

sudo apt-get install python3-pip

Other answers show how to use pip with both 2.X and 3.X Python, but does not show how to handle the case of multiple Python distributions (eg. original Python and Anaconda Python).

I have a total of 3 Python versions: original Python 2.7 and Python 3.5 and Anaconda Python 3.5.

Here is how I install a package into:

  1. Original Python 3.5:

     /usr/bin/python3 -m pip install python-daemon
    
  2. Original Python 2.7:

     /usr/bin/python -m pip install python-daemon
    
  3. Anaconda Python 3.5:

     python3 -m pip install python-daemon
    

    or

     pip3 install python-daemon
    

    Simpler, as Anaconda overrides original Python binaries in user environment.

    Of course, installing in anaconda should be done with conda command, this is just an example.


Also, make sure that pip is installed for that specific python.You might need to manually install pip. This works in Ubuntu 16.04:

sudo apt-get install python-pip 

or

sudo apt-get install python3-pip
added 306 characters in body
Source Link
quasoft
  • 5.5k
  • 2
  • 37
  • 38

Other answers show how to use pip with both 2.X and 3.X Python, but does not show how to handle the case of multiple Python distributions (eg. original Python and Anaconda Python).

I have a total of 3 Python versions: original Python 2.7 and Python 3.5 and Anaconda Python 3.5.

Here is how I install a package into:

  1. Original Python 3.5:

     /usr/bin/python3 -m pip install python-daemon
    
  2. Original Python 2.7:

     /usr/bin/python -m pip install python-daemon
    
  3. Anaconda Python 3.5:

     python3 install python-daemon
    

    Simpler, as Anaconda overrides original Python binaries in user environment.

    Of course, installing in anaconda should be done with conda command, this is just an example.


Also, make sure that pip is installed for that specific python.You might need to manually install pip. This works in Ubuntu 16.04:

sudo apt-get install python-pip 

or

sudo apt-get install python3-pip

I have a total of 3 Python versions: original Python 2.7 and Python 3.5 and Anaconda Python 3.5.

Here is how I install a package into:

  1. Original Python 3.5:

     /usr/bin/python3 -m pip install python-daemon
    
  2. Original Python 2.7:

     /usr/bin/python -m pip install python-daemon
    
  3. Anaconda Python 3.5:

     python3 install python-daemon
    

    Simpler, as Anaconda overrides original Python binaries in user environment.

    Of course, installing in anaconda should be done with conda command, this is just an example.


Also, make sure that pip is installed for that specific python.You might need to manually install pip. This works in Ubuntu 16.04:

sudo apt-get install python-pip 

or

sudo apt-get install python3-pip

Other answers show how to use pip with both 2.X and 3.X Python, but does not show how to handle the case of multiple Python distributions (eg. original Python and Anaconda Python).

I have a total of 3 Python versions: original Python 2.7 and Python 3.5 and Anaconda Python 3.5.

Here is how I install a package into:

  1. Original Python 3.5:

     /usr/bin/python3 -m pip install python-daemon
    
  2. Original Python 2.7:

     /usr/bin/python -m pip install python-daemon
    
  3. Anaconda Python 3.5:

     python3 install python-daemon
    

    Simpler, as Anaconda overrides original Python binaries in user environment.

    Of course, installing in anaconda should be done with conda command, this is just an example.


Also, make sure that pip is installed for that specific python.You might need to manually install pip. This works in Ubuntu 16.04:

sudo apt-get install python-pip 

or

sudo apt-get install python3-pip
added 306 characters in body
Source Link
quasoft
  • 5.5k
  • 2
  • 37
  • 38

I have a total of 3 Python versions under Ubuntu 16.04: original Python 2.7 and Python 3.5 and Anaconda Python 3.5.

  • original Python 2.7
  • original Python 3.5
  • Anaconda 3.5

Here is how I install a pip package into original Python 3.5:

/usr/bin/python3 -m pip install python-daemon
  1. Original Python 3.5:

     /usr/bin/python3 -m pip install python-daemon
    
  2. Original Python 2.7:

     /usr/bin/python -m pip install python-daemon
    
  3. Anaconda Python 3.5:

     python3 install python-daemon
    

    Simpler, as Anaconda overrides original Python binaries in user environment.

    Of course, installing in anaconda should be done with conda command, this is just an example.

To install the same package in another version of Python, just change the path to the binary (eg. /usr/bin/python).

 

Also, make sure that pip is installed for that specific python. For example, I hadYou might need to separatelymanually install pip for Ubuntu's built-in python manually. This works in Ubuntu 16.04:

sudo apt-get install python-pip 

or

sudo apt-get install python3-pip

I have a total of 3 Python versions under Ubuntu 16.04:

  • original Python 2.7
  • original Python 3.5
  • Anaconda 3.5

Here is how I install a pip package into original Python 3.5:

/usr/bin/python3 -m pip install python-daemon

To install the same package in another version of Python, just change the path to the binary (eg. /usr/bin/python).

Also, make sure that pip is installed for that specific python. For example, I had to separately install pip for Ubuntu's built-in python manually:

sudo apt-get install python3-pip

I have a total of 3 Python versions: original Python 2.7 and Python 3.5 and Anaconda Python 3.5.

Here is how I install a package into:

  1. Original Python 3.5:

     /usr/bin/python3 -m pip install python-daemon
    
  2. Original Python 2.7:

     /usr/bin/python -m pip install python-daemon
    
  3. Anaconda Python 3.5:

     python3 install python-daemon
    

    Simpler, as Anaconda overrides original Python binaries in user environment.

    Of course, installing in anaconda should be done with conda command, this is just an example.

 

Also, make sure that pip is installed for that specific python.You might need to manually install pip. This works in Ubuntu 16.04:

sudo apt-get install python-pip 

or

sudo apt-get install python3-pip
Source Link
quasoft
  • 5.5k
  • 2
  • 37
  • 38
Loading