-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Poetry build is ignoring the virtual environment Python when building and instead using the Python it has been installed against #3508
Comments
Working with @matteosantama, we found it traces back to this method: Line 432 in bf30ca6
ETA: I directly tested the |
I have not understood what is the issue here. Is it maybe a matter of calling Could you try to recreate and observe if anything changes in the content of |
Here's some further detail as I'm able to replicate and expand on the original issue
Notice how a 3.9 wheel has been built even though it's supposed to be a package for 3.8 only. The fact that the build works also indicates that the correct virtual environment is being used since Cython and Numpy are needed for the build. It appears as though the correct virtualenv is used to build but the label for the wheel is using the Py version that is running Poetry (this is the only Python 3.9 I have on my system).
|
Thanks for expanding. I see the issue now. I wouldn't know where to start, though. |
Well it actually seems to be two issues. One is naming the wheel. The other is not using the correct environment when told to.
|
When I mentioned using You seem to say you use pyenv to create the virtual environment. As far as I know pyenv does not know how to do that. Do you mind clarifying that bit? |
We use this: https://github.com/pyenv/pyenv-virtualenv |
I'm not familiar with the |
In your case, it seems to me like there is no reason to deactivate the Of course it still doesn't explain the issue though. |
@sinoroc I opened a seperate issue regarding the naming of the wheel. Regarding |
I am out of my depth as well. If you feel confident that you have clearly identified 2 distinct issues, then yes feel free to close this one. As long as we have the link back to this current issue, it should be all good anyway. |
I believe I am experiencing this issue as well on Arch Linux with Python 3.9: This gist contains a minimal Python 3.8 pyproject.toml and the output of The single dependency attempts to load a module in its setup.py, so at first I believed this to be an instance of #3501. However this case is different in that the dependency already contains a pyproject.toml with build-systems.requires defined. I think the build fails because it is looking for a Python 3.9 wheel for tensorflow, which only supports up to Python 3.8. I installed poetry in a Python 3.8 docker container, and ran the build inside successfully. |
Hey @cheesinglee The issue with sensenet is related to this comment: #3054 (comment) Basically, Poetry doesn't yet install build requirements but requires the build environment to be set up already. Our package handles this by adding whatever is required for build as a dev dependency. It's not ideal but Poetry is evolving and should end up improved on this front. |
I can reproduce this issue on MacOS Big Sur as well. |
@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 #3523 |
@iserko |
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 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). |
The original issue does not reproduce with |
i had this issue with 1.5.0 on my mac. Once the pypoetry dir existed in Caches, poetry insisted on using it. I didn't know there was a prefer-active-python config and lost several hours due to this. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
OS: 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
withbrew
, it builds a Python 3.9 wheel and I getERROR: infima-0.71.9-cp39-cp39-macosx_11_1_x86_64.whl is not a supported wheel on this platform.
. When I installpoetry
withpipx
, it builds a wheel formacosx_10_16
(which does not exist), but I am able to install it.Steps to reproduce:
Then after
brew uninstall poetry
:Could be related to #3463
The text was updated successfully, but these errors were encountered: