question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

After the installation of poetry via the new script `install-poetry.py` poetry ignores pyenv local python version

See original GitHub issue
  • [x ] I am on the latest Poetry version.

  • [x ] I have searched the issues of this repo and believe that this is not a duplicate.

  • OS version and name: Kernel: 5.4.0-74-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: MATE 1.24.0 wm: marco dm: LightDM Distro: Linux Mint 20.1 Ulyssa base: Ubuntu 20.04 focal

  • Poetry version: 1.1.6

Issue

After the installation of poetry via the new script install-poetry.py poetry ignores pyenv local python version. I don’t know why. I checked those issue 1, 2, 3 but nothing work for me. After uninstalling and installing via old script get-poetry.py all semis to work. Except of this bug mentioned hier.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

15reactions
istrupincommented, Nov 15, 2021

poetry env use $(pyenv which python) seems to get me unblocked, but it would be nice for this to “just work”, or at the very least, for it to be included in the docs, since they imply that local pyenv settings should get picked up.

8reactions
techdragoncommented, Aug 19, 2021

Not working well with pyenv like previous versions did, feels more like the sort of thing that belongs in a a x.0.0 major release. This significantly affects how I have to manage my python environments in order to have poetry just recognise a version.

In previous behaviour I could have a 3.6,3.7,3.8,3.9 all installed via pyenv and poetry would automatically use the right one for the python version inside pyproject.toml, it was the best python environment management has ever been. While the new changes are I’m sure (from what I have read of the rationale, and my experience as a fellow python dev who has looked into this sort of thing) a significant improvement in maintainability… it is a degradation of functionality for the end users that needs promptly addressing. So, with that In mind, how can I help? Anyone got PRs for this that need testing or extra eyeballs on potential fixes?

edit: It’s worth noting that this change of behaviour also has knock on impacts. If you install poetry in each pyenv python version, so that you can just use poetry in the currently activated pyenv python version, you end up “polluting” the base environment which will affect any use of the --system-site-packages option which while poetry doesn’t use this by default, this does potentially impact the management of other virtualenvs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using Poetry with PyEnv and having Python version issues
I'm trying to use python 3.10.0 for my development. I've done the following: pyenv install 3.10.0; cd to my project folder and pyenv...
Read more >
Configure a Poetry environment | PyCharm Documentation
Poetry is a tool that facilitates creating a Python virtual environment based on the project dependencies. You can declare the libraries your project ......
Read more >
Announcing Poetry 1.2.0 | Blog
Poetry will be installed using the Python interpreter the installer is invoked with. The new installer (or a compatible install method such as ......
Read more >
User Guide - Hypermodern Python Cookiecutter documentation
Both of these commands should display the latest Python version, 3.10. For local ... Install Poetry by downloading and running install-poetry.py: $ python...
Read more >
FS#65296 : [python-poetry] poetry ignores pyenv local version
Shows that system python is being used instead of 3.7.5. This does not happen when installing poetry manually via get-poetry.py
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found