1

My question is thoroughly based on this question. The big difference is I'm focusing on windows here. The answers/question provided there were for unix distributions.

I've ran Python 2.x for quite a while and have used pip with no problems.

Now I've installed python 3 but when I open the cmd prompt and pip install somemodule it tries to install it for python 2. How can I deal with this situation ?

Both Python's were installed with the Anaconda distribution so I believe both of them come with pip installed. Note: This info come from this question

EDIT: Found this answer which addresses that issue.

But now when I try to run the command

pip3.5 install pymssql

or

pip-3.5 install pymssql

I get the error pip3.5 is an unknown command.

If I open cmd and type python I receive:

Python 3.5.1 Anaconda 4.0.0

so it shouldn't be a version problem

Community
  • 1
  • 1
Pedro Braz
  • 2,261
  • 3
  • 25
  • 48

1 Answers1

1

You will want to make sure you have the correct Anaconda environment activated, which it looks like you have in this case.

conda env list   # Display the list of conda environments

enter image description here

In the Windows Command Prompt you should just need to use:

activate py35   # Or whatever your Python 3.5 environment is called. (Mine is root)
pip install pymssql

Instead of pip-3.5.

To install it in another environment (mine is called py27):

activate py27
pip install pymssql

I successfully used this command in both my Python 2.7 and 3.5 Anaconda environments.

To go back to your primary environment (root), just type activate without an environment name after it

ode2k
  • 2,653
  • 13
  • 20