[Python] Why is pyproject-build.exe not on PATH in Anaconda, and how can I ensure both .tar.gz...

Discussão em 'Python' iniciado por Stack, Novembro 19, 2024.

  1. Stack

    Stack Membro Participativo

    I am trying to package a Python project using py -m build within an Anaconda environment. However, I noticed that only the .tar.gz source distribution is being created, and the .whl (wheel) distribution is missing.

    This is the exact error:

    ERROR Backend subprocess exited when trying to invoke build_wheel


    While troubleshooting, I discovered that the script pyproject-build.exe is located in the Scripts folder of my Anaconda installation (Anaconda3/Scripts), which is not included in my system's PATH.

    Steps I've Taken:


    1. Verified that build is installed:

      python3 -m pip install --upgrade pip

    2. Checked the Scripts folder location mentioned in the upgrade warning message.


    3. Tried running:

      py -m build


      This successfully creates the .tar.gz file in the dist directory but does not generate the .whl file.
    Questions:


    1. How can I add the Scripts directory to my PATH so that pyproject-build.exe is recognized?


    2. What steps should I take to ensure that both .tar.gz and .whl distributions are created when running py -m build?


    3. Are there additional dependencies or configurations in the pyproject.toml file that I should check?

    Continue reading...

Compartilhe esta Página