3

In brief, I have Python 3.5 but now I also installed 3.6.

I am trying this:

pip3 install web3

This installs web3 only for Python 3.5 (my previous version), I want to make it for 3.6 as well? Thanks!

4
  • Sounds like you need to start using virtual environments. Google "python -m venv env" for examples and explainations. Commented Sep 3, 2018 at 3:34
  • What's your Operating System,You can use tool like pyenv to switch your current python version Commented Sep 3, 2018 at 3:38
  • ubuntu 16.04, I am now trying this...as I want pip to work under 3.6 in the future: stackoverflow.com/questions/42662104/… Commented Sep 3, 2018 at 3:42
  • You can read this: linuxconfig.org/… Commented Sep 3, 2018 at 5:05

1 Answer 1

6

Your pip3 still has the path to Python 3.5 in it, so that is what gets run. You can also run pip as a module using the specific Python that you want.

python3.6 -m pip ...

Alternatively, copy pip3 to pip3.6 then modify it to use python3.6.

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

2 Comments

OK, your solution works as it finds web3 now...but I'm getting "fatal error can't find python.h" when it proceeds to installing any package...maybe it still acts as if this is the old version.
How did you install it, and what OS is it? That looks like you may be missing a "dev" package for it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.