0

I am seeing some weird stuff on my system:

$ pip install python-binance-api
...Library/Python/2.7/lib/python/site-packages (from python-binance-api) (3.13.2)
...

python versions:

$ python --version
Python 2.7.14
 10:05 PM   ~/kittycapital   add_more_curr
$ python3 --version
Python 3.6.4

My pip is still installing to python 2.7 when I want it to install on python3. How do I get it to do this?

If I want the commands pip and python to point to python 3.7, what can I do?

Andrey Tyukin
  • 41,173
  • 4
  • 44
  • 82
Jwan622
  • 9,962
  • 16
  • 68
  • 147

1 Answers1

0

Solution 1

python3 -m pip install xxx
# for example: python3.7 -m pip install requests

Solution 2

virtualenv --python=python3.7 venv
source venv/bin/activate
pip install requests

Solution 3

pipenv --python 3.7   # python3 -m pip install pipenv --user
pipenv shell
pipenv install requests
Waket Zheng
  • 3,548
  • 1
  • 14
  • 26