Как установить библиотеку определенной версии в Python

How do I install a library of a specific version in Python?

Hi everyone! I’m making a bot here for Instagram (by the way, subscribe to mine :)) – which will like posts by the specified tags, subscribe by the specified parameters (and unsubscribe too) and so on. It is based on the InstaPy library (more on it later). In the meantime, I ran into a question that sounds like: “How to install a library of a specific version in Python?”. Let’s deal with this problem!

Sometimes it happens that after installing a library using pip, you run into a problem – the newest version turns out to be not quite right for you. And you need to install the library of a specific version. To do this, enter the following on the command line (as an example, let’s take the same InstaPy library, which was mentioned above. The current version of the library at the time of writing the post: 0.6.13, and I need to install the version: 0.6.12):

pip install instapy==0.6.12

In fact, we just gave pip to install the library and specified the version we needed. By the way, to correctly remove the library from the system, use the following construction:

pip uninstall instapy

we give the pip command to uninstall the library (yes, this method is not as beautiful as in PyCharm, but it does not leave all sorts of tails in the system).

Thanks for attention! As always – if you have any questions, write to mail or Telegram!