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

Setting PYTHONHOME required on Windows within virtualenv #225

Open
cpterry opened this issue May 11, 2020 · 3 comments
Open

Setting PYTHONHOME required on Windows within virtualenv #225

cpterry opened this issue May 11, 2020 · 3 comments

Comments

@cpterry
Copy link

cpterry commented May 11, 2020

It builds successfully but fails at runtime with "Fatal Python error: Py_Initialize: unable to load the file system codec" when built and run within a conda virtualenv. Setting PYTHONHOME to the executable folder before building and running solved the problem. I only encountered this when using a virtual environment and Windows 10.

This may be related to #213.

@JonahAllerton
Copy link

I am trying to use cpython with a conda env as well, and I'm running into the same problem where I can't seem to find anything that lets you specify environment. If I understand you correctly, you solved it by setting PYTHONHOME in your path variables?

@cpterry
Copy link
Author

cpterry commented Nov 27, 2020

It solved it with:

set PYTHONHOME=<absolute path of the current env's lib folder>

before running cargo build.

@JonahAllerton
Copy link

JonahAllerton commented Nov 27, 2020 via email

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

No branches or pull requests

2 participants