python-poetry / python-poetry/poetry

Python version change when building from wheel

Open
#8,507 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/bug status/triage
Dominant language
Python
Stars
34.3k
Forks
2.5k
Avg merge
2d 19h
Merged PRs (30d)
30

Description

  • Poetry version: 1.6.1

  • Python version: 3.10

  • OS version and name: Ubuntu 18.04

  • pyproject.toml: https://gist.github.com/hvarfner/6f83fdce670fbc762deef068d1dccb9f

  • I am on the latest stable Poetry version, installed using a recommended method.

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

  • I have consulted the FAQ and blog for any relevant entries or release notes.

  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

I am trying to install a repo from source (https://github.com/pytorch/botorch) which requires python3.9+ from a conda environment which runs python3.10. My conda base environment runs python3.8.

(py310) hvarfner@hvarfner:~/Documents/MyBO$ python
Python 3.10.12 | packaged by conda-forge | (main, Jun 23 2023, 22:40:32) [GCC 12.3.0] on linux

Then, when trying to add the repo:
poetry add git+ssh://git@github.com:pytorch/botorch.git#main

[Full error MSG in separate file]
...
...
Command ['/tmp/tmp5c67djyh/.venv/bin/python', 'setup.py', 'egg_info'] errored with the following return code 1

Output:
Your version of python (3.8) is too old. You need python >= 3.9.

/tmp/tmp5c67djyh/.venv/ runs the conda base environment with the 3.8 installation. The same thing happens when trying to add the repo from inside poetry shell (not sure if this is a good idea or not). As such, adding the repository fails, as it doesn't try to install it with the py3.10 version.

Is this a bug, or is it (as I expect) an error on my end?

error_msg.txt

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the poetry add git+ssh://git@github.com:pytorch/botorch.git#main command using the linked pyproject.toml and the reported conda environments. Start with the attached error_msg.txt and the setup.py egg_info invocation, then determine why the temporary environment uses Python 3.8 instead of 3.10. Done should establish whether this is Poetry behavior or an environment configuration issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.