`brew install poetry` depends on `python@3.10` and not using pyenv python (macOS)
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: macOS 12.3.1
- Poetry version: 1.1.13
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/xareelee/eafcac5d14c37b19b3e727bc307ba193
Issue
I installed both pyenv and poetry by homebrew on macOS.
$ brew install pyenv
$ pyenv --version
pyenv 2.2.5
$ brew install poetry
$ poetry --version
Poetry version 1.1.13
I installed python 3.10.3 by pyenv
$ pyenv install 3.10.3
$ pyenv global 3.10.3
$ pyenv versions
system
* 3.10.3 (set by ~/.pyenv/version)
# check python version and path
$ python --version
Python 3.10.3
$ ls -lh `which python`
-rwxr-xr-x 1 xaree staff 182B Mar 23 06:44 /Users/xaree/.pyenv/shims/python
Now I create a python project using poetry
$ mkdir hello
$ cd hello
$ poetry init -n
# enter venv
$ poetry shell
# Check python version. It's not 3.10.3
$ python --version
Python 3.10.2
$ ls -lh `which python`
lrwxr-xr-x 1 xaree staff 44B Apr 7 12:59 /Users/xaree/dev/playground/hello/.venv/bin/python -> /opt/homebrew/opt/python@3.10/bin/python3.10
The poetry uses brew’s python, not pyenv’s python. I did not install brew’s python manually, but brew’s poetry did.
Questions:
- Is the dependency
python@3.10
necessary inpoetry.rb
for brew installation? - How could I initiate a poetry project with specific pyenv’s python?
This issue may associate with https://github.com/python-poetry/poetry/issues/4646.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
How to Set Up Python and Poetry
Setting up Python using pyenv. First, install pyenv. There are different ways to do so as described here. For Mac, I choose the...
Read more >Why is not recommended to install poetry with homebrew?
Homebrew installed poetry will probably also depend on Homebrew-installed Python, etc, instead of having its own isolated venv to execute from.
Read more >Managing environments | Documentation
By default, Poetry will try to use the Python version used during Poetry's installation to create the virtual environment for the current project....
Read more >How to Manage Multiple Python Versions on an Apple ...
How to Manage Multiple Python Versions on an Apple Silicon M1 Mac. Install both ARM64 and x86 Python versions and seamlessly switch between...
Read more >What are your thoughts on Homebrew for getting Python3 ...
I install Python with Homebrew and then use Pyenv. ... Pyenv does not depend on Python itself. pyenv was made from pure shell...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
BTW, this issue could be resolved by reinstalling poetry with the official way:
I leave the issue opened for installing poetry with brew.
Homebrew installation is not an official one and is not maintained by the Poetry team. The only official ways are the ones that are mentioned in Poetry documentation.