Open MasterGroosha opened 4 months ago
I would also like to add this strange output, while already having venv (installed with pyenv) activated:
(venv) ➜ poetry-playground poetry env info
Virtualenv
Python: 3.11.7
Implementation: CPython
Path: NA
Executable: NA
Base
Platform: darwin
OS: posix
Python: 3.11.7
Path: /Library/Frameworks/Python.framework/Versions/3.11
Executable: /Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11
This is absolutely wrong, because despite having 3.11 as system interpreter, virtual environment uses 3.12.2
@MasterGroosha: See if this workaround is relevant to you: https://github.com/python-poetry/poetry/issues/8119#issuecomment-2157934433
Description
I prefer to keep my venvs controlled by pyenv and located in the project directory. This is how I create a new virtual environment ("poetry-playground" is the name of the current directory):
At this point, venv (located in "venv" folder) is created and activated. Next, I init a new poetry project inside venv:
Next, I want to add
requests
, but somehow it installs not to the current venv, but somewhere else (presumably, to system interpreter):And of course, no
requests
is installed to the current venv.The question is: is it possible to use poetry in this kind of environment? I've been using
pip
for years and trying to switch to poetry right now, so maybe I'm missing something. As you can see in "poetry configuration" section below, I already have:If I set
virtualenvs.create
totrue
, then myvenv
is ignored and poetry creates a new venv in./.venv
directory. This is not something I want. Again, I want to create my own venv using pyenv (with any Python version I like) and then control it with poetry. Thanks in advance!Workarounds
None that I'm satisfied with
Poetry Installation Method
other
Operating System
MacOS 14.5 Sonoma
Poetry Version
Poetry (version 1.8.3)
Poetry Configuration
Python Sysconfig
No response
Example pyproject.toml
No response
Poetry Runtime Logs