Categories
Python Answers

How to install a module using pip for specific Python version?

Spread the love

Sometimes, we want to install a module using pip for specific Python version.

In this article, we’ll look at how to install a module using pip for specific Python version.

How to install a module using pip for specific Python version?

To install a module using pip for specific Python version, we can use the version number as a flag when running python.

For instance, we write

py -2 -m pip install pyfora

to use py -2 to run pip to install packages for Python 2.

Conclusion

To install a module using pip for specific Python version, we can use the version number as a flag when running python.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *