Comments (7)
The python
is mapped to python3.8 too.
I actually have zero idea, how poetry script could fall into python2.7.
from poetry-pycharm-plugin.
@sapiosexual
Thank you for creating this issue.
I guess the poetry was executed by Python2.7.
The latest version of poetry raises an error when running on python2.7.
Would you please try installing poetry with pipx? https://python-poetry.org/docs/#installing-with-pipx
pipx fix python version for each command.
If some users are confused by this behavior of poetry with pyhton2.7, then I implement fallback action on the plugin to execute python3.x.
from poetry-pycharm-plugin.
@koxudaxi
Thank you for your reply.
It seems pipx fixed my issue.
But it is still interesting that usual installation of poetry works fine via cli is executed strictly by python3.8, but plugin runs python2.7 version.
However my issue is closed, have a nice day.
from poetry-pycharm-plugin.
It seems pipx fixed my issue.
It's great.
But it is still interesting that usual installation of poetry works fine via cli is executed strictly by python3.8, but plugin runs python2.7 version.
The poetry script is specified the python path in the first line.
This path may be python
.
I think the plugin executed the interpreter of the path in your environment.
from poetry-pycharm-plugin.
@abn
Would you please help us?
We have a problem that the PyCharm plugin gets an error when calling poetry.
The reason is the poetry is executed by Python2.7.
This plugin calls poetry from a new process.
I guess this process detects the python execution on line 1 of the poetry file.
$ head -n 1 `which poetry`
#!/usr/bin/env python
A lot of systems will get python2.7 from this shebang.
Unfortunately, Poetry cuts Python2.7, and poetry returns an error when it is executed from Python2.7.
I found a workaround that we use pipx to install poetry.
But, I think a lot of users don't choose this way.
I have two ideas to resolve this problem.
-
Poetry plugin execute poetry with python3 executable.
-
Poetry change shebang to python3.
#!/usr/bin/env python3
PRO:
We don't touch poetry source code.
CON:
Should we force using Python3? some users may use python2.7 with older poetry.
PRO:
The changes affect only the latest version of users of poetry.
It may help non-pycharm users.
CON:
I don't know how it impacts on source code of poetry.
Windows environment might not the same executable name.
How do you think about this problem?
from poetry-pycharm-plugin.
@koxudaxi but as far as I understand pycharm plugin offers to select base interpreter.
Why just don't use this executable?
Moreover, I think plugin should detect poetry version and show a warning in case user picks python base interpreter that is incompatible with poetry version.
from poetry-pycharm-plugin.
@sapiosexual
I'm sorry for my late reply.
but as far as I understand pycharm plugin offers to select base interpreter.
Why just don't use this executable?
In some cases, the plugin has already detected the base interpreter.
But, It isn't all case. The plugin needs to execute poetry before users select the base interpreter.
Moreover, I think plugin should detect poetry version and show a warning in case user picks python base interpreter that is incompatible with poetry version.
I think this problem is on the poetry side.
We should resolve the problem as possible outside of the plugin.
from poetry-pycharm-plugin.
Related Issues (20)
- Make it work with PyCharm 212.* HOT 4
- Extra dependencies set installation fails when done from the plugin HOT 2
- Creating poetry environment does not use specified version of Python HOT 3
- NoSuchMethodError: PySdkExtKt.getAssociatedModule(Module) in PyCharm 2021.2, update to new API HOT 2
- Explain how to attach the source code during development HOT 2
- Unsupported TomlTableHeader type HOT 1
- Add Run Configuration HOT 1
- Support PyCharm 2021.3 EAP HOT 4
- Add Python Interpreter Failed, missing module. HOT 3
- Update for DataSpell EAP 213 HOT 2
- Plugin error: Plugin 'Poetry' (version '1.1.5-212') is not compatible with the current version of the IDE, because it requires build 212.* or older but the current build is PC-213.4631.9
- 8:39 AM Plugin error: Plugin 'Poetry' (version '1.1.5-212') is not compatible with the current version of the IDE, because it requires build 212.* or older but the current build is PC-213.4631.9 HOT 7
- Invalid virtual environment detected because of escape sequences and colors (ANSICON env variable defined) HOT 2
- Plugin creates separate Poetry environment, although one already exists HOT 2
- Toml-plugin-dependent features not working HOT 1
- IDE Fatal Error after git pull. HOT 1
- Support for latest PyCharm release (build 213.5744.248) HOT 3
- Plugin 'Poetry' (version '1.1.5-212') is not compatible with the current version of the IDE, because it requires build 212.* or older but the current build is IU-213.5744.223 HOT 3
- Plugin Incompatible requires IDE build 212.* or later HOT 3
- Maybe this project should be archived? And pin an issue stating what has happened HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from poetry-pycharm-plugin.