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

Add support for venvs. #3284

Open
BeastLe9enD opened this issue Jul 2, 2023 · 2 comments
Open

Add support for venvs. #3284

BeastLe9enD opened this issue Jul 2, 2023 · 2 comments

Comments

@BeastLe9enD
Copy link

I have a python venv and in my opinion, there should be a function to load the venv into the pyo3 runtime. Something like

pyo3::set_venv("/path/to/your/venv");

would make things very easy. Or is there a simple way how this is possible that I'm missing?

@adamreichold
Copy link
Member

Usually, activating the venv before building your project should be sufficient as we normally use the first python3 binary found on the path to determine the interpreter configuration.

@mobile-bungalow
Copy link

those of us on MacOs are still waiting on #1741. additionally, hot swapping venvs at runtime has more surface area than just updating the path as suggested in the linked issue. You also have to remove the sites-packages paths from preexisting venvs if they exist and account for platform differences in path name. This might actually be a small nice to have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants