简体   繁体   中英

Install futures for python2

I have various versions of Python on my Ubuntu OS. When I want to install futures, it writes the following message:

$ sudo pip2 install futures

Requirement already satisfied: futures in /usr/local/lib/python3.8/dist-packages (3.1.1)

When uninstall it and install it again, it does not help.

How would you install futures for Python2 ?

All the pips that I have (pip, pip2, pip2.7, pip3, pip3.6, pip3.7, pip3.8) point here: pip 20.2.3 from /usr/local/lib/python3.8/dist-packages/pip (python 3.8)

Can I change it?

Running pip install something may do what you expect if everything is configured well, but in general it often happens that you do not really know in which python that is going to install something.

To be certain in which python you are installing, it is best to run python -m pip instead of just pip . That way you can choose exactly which python installation should be updated, by simply using the same Python you would use to run later when you use the installed library eg:

python -m pip install something

or

python3 -m pip install something

or

/usr/bin/python2.7 -m pip install something

or

"C:\Program Files\Python3.6\python.exe" -m pip install something

or ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM