Pycharm requirements.txt wrong version warnings

I have in my `requirements.txt` e.g.

numpy>=1.18.2

Installed is 1.18.4, so the requirement is fulfilled.

pip3 freeze | grep numpy
numpy==1.18.4

Pycharm warning says:

'numpy' version '1.18.2' is not installed (required: 1.18.2, installed: 1.18.4, latest: 1.18.4) 

Doesn't the inspector understand the `>=` notation, or does it's interpretation differ from mine? The inspector offers to install 1.18.2 and 1.18.4.

2
6 comments

Hello, 

 

Please go to  Tools menu, select "Sync Python Requirements".  What do you have selected in "Version in requirements" ?  Is it "Greater of equal" ? 

0
Avatar
Permanently deleted user

Hi,

I had selected "compatible version", but this is just how PyCharm will generate my `requirements.txt`. I can't let PyCharm edit my requirements.txt though. When I select something else, the warnings still remain.

The issue is more that PyCharm seems to have problems matching the installed versions with the required versions. Pip for example doesn't. Requirements.txt says `numpy>=1.18.2`, and it installed `numpy==1.18.4`. Which is totally fine and the whole point or specyfing greater or equal versions.

0

Could you please attach : 

1. A screenshot of  Package requirements file path configured (https://www.jetbrains.com/help/pycharm/settings-tools-python-integrated-tools.html), does it point on the file in question?

2.  A screenshot of  Project Interpreter settings https://www.jetbrains.com/help/pycharm/installing-uninstalling-and-upgrading-packages.html

3. The requirements.txt file content. 

0
Avatar
Permanently deleted user

Project requirements file points to my `requirements.txt` correctly.

Below a screenshot of the interpreter settings, pointing to the correct virtualenv, and the `requirements.txt` file.

I noticed that I can avoid the warning by specifying e.g. `opencv-python>=4.2*`, but not `opencv-python>=4.2.*`. Still it doesn't explain why there should be a problem with `numpy`.

0

Hello, 

 

Please disable the custom plugin for "requirements.txt"  and let me know if it helps. 

0

It really was a plugin bug. It has been corrected for a long time. Thanks for using the plugin

 
0

Please sign in to leave a comment.