Menu Close

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

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.

Posted in Python, Python Answers