-1

I have both versions, but when I used pip to download lxml it apparently got installed in 2.7, how can I specify the installation path?

$ python
Python 2.7.10 (default, Oct 23 2015, 19:19:21) 
2
  • 3
    have you tried using pip3 Commented Dec 15, 2016 at 19:24
  • I was not aware of that command! thank ye Commented Dec 15, 2016 at 19:25

2 Answers 2

1

You can try

python3 -m pip install lxml

or

pip3 install lxml

Sign up to request clarification or add additional context in comments.

Comments

1

Have you installed the versions via Anaconda environments(link is an example on how to, the question is for Mac, but the answer should apply for everything) ?

If so, you need to first activate the environment for the respective version (e.g. if conda create -n py3 Python=3 created the environment, give activate py3 before pip install)

if not, 1. you should consider anaconda 2. you need to check which python version is in the path. I am guessing there are two python executables at two separate folders. Check your path. Try running 'which python' to see which python is executed. In each of the two folders there is a pip executable. You need to run the one that is in the Python 3 installation.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.