Poetry build is ignoring the virtual environment Python when building and instead using the Python it has been installed against
See original GitHub issueOS: maOS 11.1 (Big Sur) Python: 3.8.5 (pyenv)
Poetry build is ignoring the virtual environment Python when building and instead using the Python it has been installed against.
When I install poetry
with brew
, it builds a Python 3.9 wheel and I get ERROR: infima-0.71.9-cp39-cp39-macosx_11_1_x86_64.whl is not a supported wheel on this platform.
. When I install poetry
with pipx
, it builds a wheel for macosx_10_16
(which does not exist), but I am able to install it.
Steps to reproduce:
$ brew install poetry
$ poetry build
Building infima (0.71.9)
- Building sdist
- Built infima-0.71.9.tar.gz
- Building wheel
running build
running build_py
package init file 'src/infima/datasets/embs/sec/sql/__init__.py' not found (or not a regular file)
running build_ext
- Built infima-0.71.9-cp39-cp39-macosx_11_1_x86_64.whl
Then after brew uninstall poetry
:
$ pipx install poetry --python python3.8
$ poetry build
Building infima (0.71.9)
- Building sdist
- Built infima-0.71.9.tar.gz
- Building wheel
running build
running build_py
package init file 'src/infima/datasets/embs/sec/sql/__init__.py' not found (or not a regular file)
running build_ext
- Built infima-0.71.9-cp38-cp38-macosx_10_16_x86_64.whl
$ poetry config --list
cache-dir = "/Users/matteosantamaria/Library/Caches/pypoetry"
experimental.new-installer = true
installer.parallel = true
repositories.gitlab.url = "https://gitlab.com/..."
virtualenvs.create = false
virtualenvs.in-project = null
virtualenvs.path = "{cache-dir}/virtualenvs" # /Users/matteosantamaria/Library/Caches/pypoetry/virtualenvs
Could be related to #3463
Issue Analytics
- State:
- Created 3 years ago
- Reactions:5
- Comments:18 (1 by maintainers)
Top Results From Across the Web
Python Poetry: Package and venv Management Made Easy
Learn how to install and use the Python Poetry package manager to manage the dependencies and virtual environment(s) of your Python 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 >Python Virtual Environments tutorial using Virtualenv and Poetry
A mini-guided Python tutorial showing how to use virtual environment and why it's matters on virtualenv and poetry illustrated examples.
Read more >Poetry doesn't use the correct version of Python - Stack Overflow
For instance on my machine poetry has 3 virtual environments installed ... (e.g. python = ">=3.6.2 <3.7" ) after creating the virtualenv.
Read more >Configure a Pipenv environment | PyCharm Documentation
Pipenv is a tool that provides all necessary means to create a virtual environment for your Python project. It automatically manages project packages ......
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
We ran into this on OSX. In our case we were telling poetry to not create a virtualenv but it insisted on writing to a virtualenv in the
$HOME/Library/Caches/pypoetry/...
dir. We fixed this by blowing away the$HOME/Library/Caches/pypoetry
directory.Using this workaround, it still works for us when we are using python 3.8 in our application and poetry is depending on python 3.10 as it does when installed from brew.
hth.
(search terms: work around, fix).
@sinoroc https://gist.github.com/iserko/1e88e05675e360b23d52bac65c3baced replicated on Debian Buster (where poetry is installed using Homebrew and uses the Homebrew’d Python 3.9)
seems to be related to https://github.com/python-poetry/poetry/issues/3523