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

Fix Win32 Conda Python Interpreters #644

Merged
merged 6 commits into from
Oct 9, 2021
Merged

Conversation

formlogic-robert
Copy link
Contributor

Trying to use maturin with a conda environment on Windows that has my python.exe in the root with the .exe file extension. I keep getting the error message because the Rust Command is sending it to ShellExecute and not the in-process command interpreter.

@netlify
Copy link

netlify bot commented Oct 8, 2021

✔️ Deploy Preview for maturin-guide ready!

🔨 Explore the source changes: 8c7acb9

🔍 Inspect the deploy log: https://app.netlify.com/sites/maturin-guide/deploys/6160dd3854f08c0008b02305

😎 Browse the preview: https://deploy-preview-644--maturin-guide.netlify.app

src/python_interpreter.rs Outdated Show resolved Hide resolved
@messense
Copy link
Member

messense commented Oct 9, 2021

Trying to use maturin with a conda environment on Windows that has my python.exe in the root with the .exe file extension. I keep getting the error message

What error message did you get?

@formlogic-robert
Copy link
Contributor Author

formlogic-robert commented Oct 9, 2021

I got something like this:
Error getting Python version info from conda env at C:\Users\<user-name>\Anaconda3\envs\foo1

I go there and I definitely have python.exe in that env folder, which is the same as the folder returned in conda info -e. I copy it to my terminal inside Visual Studio Code where conda is activated and add the parameters that maturin does and I can correctly obtain the version info.

I can not alias python.exe as python either to work around it because inside the env folder there is a folder called python. Apparently you can't have a file with the same name as a folder.

Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation.

@messense messense merged commit 3e0a44e into PyO3:main Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants