0

I have 2 anaconda in my system: one with python 2.7 & and another with python 3.5.

My command prompt is showing python version as 2.7.

I need to install one package for Python 3.5 using pip only,not conda install. I installed it using pip. It's showing installed successfully, but I'm not able to import it in Anaconda with Python 3.5.

My python 2.7 path is given in path environmental variable. Can you suggest me how to install it using pip install for python 3.5?
I don't have python 3 installed in my system. I think I have anaconda 3.5 environment in my system. Please refer the screen shot. Also I can't able to install python 3.5 in my system enter image description here

2
  • did you try python3 in your command line? Commented Nov 14, 2018 at 7:09
  • Yes, I tried. It's showing python3 is not recognized as internal or external command Commented Nov 14, 2018 at 7:52

3 Answers 3

2

To install a package in specific version, try this:

A specific version of python:

$ python-3.5 -m pip install <pkg-name>
Sign up to request clarification or add additional context in comments.

Comments

1

Assuming you mean that you have two conda environments, go to a Anaconda command prompt and activate the Python 3.5 environment. Then, if pip is not installed, do:

conda install pip

Then, you should be able to run

pip install <package>

to install in to Python 3.5 provided that you are in the Python 3.5 environment.

If you don't have a Python 3.5 environment yet, simply do

conda create --name py35 python=3.5

followed by

activate py35          (Windows)
source activate py35   (Linux or macOS)

1 Comment

This should be the answer for a system with Anaconda.
0

You can use:

pip install --install-option="--prefix=$PATH_PREFIX" <package_name>

or

pip install -t <direct directory> <package_name>

1 Comment

Actually I don't have python 3.5 in my system. I think I have anaconda 3.5 environment in my system. Please refer the screen shot, I have updated in my original post & also I can't able to install python 3.5 in my system

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.