koxudaxi / poetry-pycharm-plugin

A PyCharm plugin for poetry

Home Page:https://koxudaxi.github.io/poetry-pycharm-plugin/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Environment not properly detected

galen1090 opened this issue · comments

I have an already configured poetry environment and when I try to add it with this plugin using "Existing environment" the package list is empty.
PyCharm continually complains about missing packages, like mypy, pylint (I have plugins to managed them, and of course they are installed), but the code works without problems.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Python Interpreter'
  2. Click on 'Add'
  3. Select 'Poetry Environment' and then 'Existing environment'
  4. Select the Python interpreter inside the existing environment (python.exe file)

Expected behavior
A package list full of all my packages. PyCharm that recognize all my packages.

Screenshots
image
image

Environments (please complete the following information):

  • IDE: PyCharm Professional 2021.1.1 ]
  • OS: Windows 10 20H2
  • Poetry Version: 1.1.6
  • Plugin version: 1.1.3

NOTE: up to a week ago everything worked without problems, then a PyCharm update caused these problems.
Is it a know bug?

Thanks

@galen104
Thank you for creating this issue.

I don't know the plugin.
Is the plugin the following the link?
https://plugins.jetbrains.com/plugin/11086-mypy

Added:
I found another one 🤔
https://plugins.jetbrains.com/plugin/13348-mypy-official-

Unfortunately, I can't reproduce the error on Ubuntu 20.04 😿

IDE: PyCharm Professional 2021.1.1
OS: Ubuntu 20.04
Poetry Version: 1.1.6
Plugin version: 1.1.3

The plugin is this:
https://plugins.jetbrains.com/plugin/11086-mypy
but it's not a question of mypy plugin, pycharm can't see any of my installed packages.
With an old version of PyCharm Professional (2020.3) all works without problems.
image.

NOTE: to make it works with PyCharm Professional 2021.1.1 I had to uninstall the poetry plugin, restart the IDE, reinstall the plugin and restart it again. Now even with PyCharm 2021.1.1 I can see all installed packages.
It's weird, but if it has worked..I'm happy anyway :-)

What version of the plugin did you use with PyCharm Professional (2020.3)?
The supported version is different 2021.1 and 2020.3.
https://plugins.jetbrains.com/plugin/14307-poetry/versions
The problem may be caused by the version 🤔

In the older PyCharm Professional (2020.3) I have installed the poetry plugin version 1.0.8.

Thank you for the information.
I checked the diff in the version. But, I can't find the reason for the problem. 😢

It's weird, but if it has worked..I'm happy anyway :-)

If you don't other problems then We can close this issue.

Of course, I welcome comments from others users.

I don't want waste your time, for now the problem is solved, so you can close the issue.
Thanks.

FYI I also had this problem: I added an existing Poetry .venv directory and no packages were listed. I uninstalled the Poetry plug-in, restarted, re-installed the Poetry plug-in, restarted, and now all installed packages are detected.

macOS 11.3.1, IntelliJ IDEA 2021.2 EAP (IU-212.4416.7), Python plug-in 212.4416.7, Poetry 1.1.4-212

I also encountered this problem. Whether I create a new poetry environment through the plugin or add an existing poetry environment through the plugin, Pycharm cannot list the packages I installed, but when I add an existing poetry environment by "Virtualenv Environment", Pycharm can list the packages I installed. After I reinstalled (or disable and then enable) the poetry plugin, the problem was resolved.

  • OS: Windows 11
  • Python: 3.10
  • Poetry: 1.1.11 (pipx)
  • Poetry plugin: 1.1.5-212
  • Pycharm: Build #PY-212.5457.59, built on October 19, 2021

@YogiLiu
Thank you for adding a comment.

This plugin is moving on PyCharm mainstream.
PyCharm 2021.3 EAP includes this poetry plugin code.
Could you please try the PyCharm 2021.3 EAP?
They changed some code when they merge this plugin into the PyCharm.
The problem may be resolved 🤔

Also, The feature should be supported by JetBrains.
https://youtrack.jetbrains.com/issue/PY-30702#focus=Comments-27-5323626.0-0

If you meet an error when you use the EAP, then would you please create the issue in youtrack?

@koxudaxi Thank you for your efforts to poetry.
I have not used PyCharm 2021.3 EAP, because I don't know if it is stable.
I will create the issue in youtrack if i meet other problems about poetry plugin.

@YogiLiu
Thank you for your understanding
I guess PyCharm 2021.3 will be released soon 😄