Skip to content
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

Failed to spawn the python child process: The system cannot find the file specified. #1988

Closed
astrojuanlu opened this issue Feb 26, 2024 · 6 comments · Fixed by #2000
Closed
Assignees
Labels
bug Something isn't working windows Specific to the Windows platform

Comments

@astrojuanlu
Copy link

Still not able to provide a minimal reproducer, but I'm putting this here in case it helps other folks.

I'm trying to replace pip with uv pip on my CI and I've been mostly successful, with the exception on Windows. There I'm getting an error like this:

> pytest tests
(uv internal error) Failed to spawn the python child process: The system cannot find the file specified.

this is despite pytest being present, as can be seen with a uv pip freeze right before.

See https://github.com/kedro-org/kedro-plugins/actions/runs/8052616036/job/21993159176 for an example of this.

The way I fixed it is by replacing pytest with python -m pytest.

I added a type ${Python_ROOT_DIR}\\Scripts\\pytest to understand what's there, see https://github.com/kedro-org/kedro-plugins/actions/runs/8053504403/job/21996069725?pr=569

I'm using uv==0.1.11, released minutes ago.

I'm unfamiliar with how scripts are created on Windows, is uv doing anything special here?

@MichaReiser
Copy link
Member

I think the issue is related to #1779

The VIRTUAL_ENV=<global_python> hack doesn't work on Windows because the Python executable is in a different location than what's expected by uv. We're working on a proper support for global installation.

For now, you can work around it by creating a virtual env instead of pointing VIRTUAL_ENV to the global python path.

astrojuanlu added a commit to kedro-org/kedro-plugins that referenced this issue Feb 26, 2024
See astral-sh/uv#1988

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
@charliermarsh charliermarsh self-assigned this Feb 26, 2024
@charliermarsh charliermarsh added bug Something isn't working windows Specific to the Windows platform labels Feb 26, 2024
@kexul
Copy link

kexul commented Feb 28, 2024

I'm still getting this error with the newest version of uv.

@konstin
Copy link
Member

konstin commented Feb 28, 2024

Do you mean 0.1.11 or the main branch?

@kexul
Copy link

kexul commented Feb 28, 2024

Do you mean 0.1.11 or the main branch?

0.1.11

@MichaReiser
Copy link
Member

Do you mean 0.1.11 or the main branch?

0.1.11

Charlie's changes have not been released yet. Please create a new issue if you're still experience issues with the new version that we release soon and include more details: What commands did you run? What's your operating system? What package do you use, etc.

@kexul
Copy link

kexul commented Feb 28, 2024

Do you mean 0.1.11 or the main branch?

0.1.11

Charlie's changes have not been released yet. Please create a new issue if you're still experience issues with the new version that we release soon and include more details: What commands did you run? What's your operating system? What package do you use, etc.

Get it! Thanks for your great work!

astrojuanlu added a commit to kedro-org/kedro-plugins that referenced this issue Mar 1, 2024
* Rename ill-named CI check for docs

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Use uv to accelerate dependency installation on CI

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Use smaller dataset for Hugging Face doctest

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Fix pytest invokation on Windows

See astral-sh/uv#1988

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Definitive fix to Hugging Face doctest

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Trigger CI

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Debug

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Bump to next uv version

* Restore pytest invokation

* Upgrade to latest version of uv

* Fix pyproject.toml

* Make docs check plugin-specific

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

---------

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
tgoelles pushed a commit to tgoelles/kedro-plugins that referenced this issue Jun 6, 2024
* Rename ill-named CI check for docs

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Use uv to accelerate dependency installation on CI

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Use smaller dataset for Hugging Face doctest

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Fix pytest invokation on Windows

See astral-sh/uv#1988

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Definitive fix to Hugging Face doctest

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Trigger CI

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Debug

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

* Bump to next uv version

* Restore pytest invokation

* Upgrade to latest version of uv

* Fix pyproject.toml

* Make docs check plugin-specific

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>

---------

Signed-off-by: Juan Luis Cano Rodríguez <juan_luis_cano@mckinsey.com>
Signed-off-by: tgoelles <thomas.goelles@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Specific to the Windows platform
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants