question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Build failing on Windows w python 3.7 and 3.8

See original GitHub issue

Hi build maintainers, If this is not the correct place to post please let me know. I’m running into an issue with building my package where build works great across versions of python on mac and linux but not on windows. specifically python 3.7 and 3.8 are failing on CI.

My CI workflow is here:

Essentially i’m setting up a test suite and want to run my tests on the installed package rather than the package files. And i’m using setupup_tools scm for the version string updates. It seems like it’s failing when it tries to install the venv / virtual environment. but i’m not sure why. I tried to reinstall build just in case something was off with the install and that didn’t work. Many thanks for any guidance or direction here. i’ve searched online and through issues but it’s a tricky failure to identify.

# Build package
  python[3](https://github.com/lwasser/stravalib/actions/runs/3483777180/jobs/5827630219#step:9:3) -m pip install build
  python3 -m build
  shell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
  env:
    pythonLocation: C:\hostedtoolcache\windows\Python\3.8.10\x6[4](https://github.com/lwasser/stravalib/actions/runs/3483777180/jobs/5827630219#step:9:4)
    PKG_CONFIG_PATH: C:\hostedtoolcache\windows\Python\3.8.10\x64/lib/pkgconfig
    Python_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.8.10\x64
    Python2_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.8.10\x64
    Python3_ROOT_DIR: C:\hostedtoolcache\windows\Python\3.8.10\x64
Requirement already satisfied: build in c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages (0.9.0)
Requirement already satisfied: tomli>=1.0.0 in c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages (from build) (2.0.1)
Requirement already satisfied: pep[5](https://github.com/lwasser/stravalib/actions/runs/3483777180/jobs/5827630219#step:9:5)17>=0.9.1 in c:\hostedtoolcache\windows\python\3.8.10\x[6](https://github.com/lwasser/stravalib/actions/runs/3483777180/jobs/5827630219#step:9:6)4\lib\site-packages (from build) (0.13.0)
Requirement already satisfied: colorama in c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages (from build) (0.4.6)
Requirement already satisfied: packaging>=19.0 in c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages (from build) (21.3)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in c:\hostedtoolcache\windows\python\3.8.10\x64\lib\site-packages (from packaging>=19.0->build) (3.0.9)
* Creating venv isolated environment...

Traceback (most recent call last):
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\build\__main__.py", line 373, in main
    built = build_call(
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\build\__main__.py", line 233, in build_package_via_sdist
    sdist = _build(isolation, builder, outdir, 'sdist', config_settings, skip_dependency_check)
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\build\__main__.py", line 143, in _build
    return _build_in_isolated_env(builder, outdir, distribution, config_settings)
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\build\__main__.py", line 107, in _build_in_isolated_env
    with _IsolatedEnvBuilder() as env:
  File "C:\hostedtoolcache\windows\Python\3.[8](https://github.com/lwasser/stravalib/actions/runs/3483777180/jobs/5827630219#step:9:8).10\x64\lib\site-packages\build\env.py", line 104, in __enter__
    executable, scripts_dir = _create_isolated_env_venv(self._path)
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\site-packages\build\env.py", line 26[9](https://github.com/lwasser/stravalib/actions/runs/3483777180/jobs/5827630219#step:9:9), in _create_isolated_env_venv
    venv.EnvBuilder(with_pip=True, symlinks=symlinks).create(path)
  File "C:\hostedtoolcache\windows\Python\3.8.[10](https://github.com/lwasser/stravalib/actions/runs/3483777180/jobs/5827630219#step:9:10)\x64\lib\venv\__init__.py", line 68, in create
    self._setup_pip(context)
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\venv\__init__.py", line 289, in _setup_pip
    subprocess.check_output(cmd, stderr=subprocess.STDOUT)
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\subprocess.py", line 493, in run
    with Popen(*popenargs, **kwargs) as process:
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\subprocess.py", line 858, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\hostedtoolcache\windows\Python\3.8.10\x64\lib\subprocess.py", line 13[11](https://github.com/lwasser/stravalib/actions/runs/3483777180/jobs/5827630219#step:9:11), in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

ERROR [WinError 2] The system cannot find the file specified
Error: Process completed with exit code 1.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
henryiiicommented, Nov 16, 2022

Could you try installing virtualenv as well (or pip install "build[virtualenv]", if you prefer)? Looks like venv is failing to setup pip.

0reactions
uranusjrcommented, Nov 17, 2022

This looks more like a GitHub Action issue to me.

Read more comments on GitHub >

github_iconTop Results From Across the Web

meson/ninja build fails with installed python >= 3.8 (Windows ...
When building gstreamer using meson/ninja configuration on Windows (possibly others) the build fails if installed python is 3.8 or higher.
Read more >
Unable to import module due to python unable to resolve ...
Hi, I am building python ibm_db C extension for Python 3.8 support. ... and python 3.8(failing case). python 3.7 : python3.7.log python 3.8...
Read more >
conda-build specifying python[version='>=3.7,<3.8.0a0'] out of ...
I get this error. Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with ...
Read more >
Frequently Asked Questions - PyOxidizer
PyOxidizer versions up to 0.7 supported Python 3.7. But a decision was made to require Python 3.8 because the run-time code to manage...
Read more >
pipenv requires python 3.7 but installed version is 3.8 and ...
My way to solve the problem is simply delete the old Pipfile and input pipenv shell in the terminal. Then it will build...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found