Skip to content

remote: exchange pids if running in Windows venv#1860

Merged
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:remote_venv
Jun 22, 2021
Merged

remote: exchange pids if running in Windows venv#1860
j9ac9k merged 1 commit intopyqtgraph:masterfrom
pijyoi:remote_venv

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented Jun 22, 2021

This PR works around the issue where the remote rendering examples (RemoteGraphicsView.py and RemoteSpeedTest.py) do not work under Windows platform when run under a venv.

Would fix #1052

Technically, the workaround could be applied for all platforms, venv or not. However, it is probably safer to only apply it where it is needed.

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Jun 22, 2021

Thanks for jumping on this @pijyoi !

I appreciate the comment/link to the upstream issue.

Merging!

@j9ac9k j9ac9k merged commit 98e9ea9 into pyqtgraph:master Jun 22, 2021
@pijyoi pijyoi deleted the remote_venv branch June 23, 2021 00:05
@eendebakpt
Copy link
Copy Markdown
Contributor

@j9ac9k @pijyoi This PR does not solve issue #1052. The reason is that even though I am working in a virtual env the value of os.getenv('VIRTUAL_ENV') is None. My environment is not started via a command line call activate, but via Spyder.

With Google I found an alternative method to detect a venv:

running_in_virtualenv = sys.prefix != sys.base_prefix

Can I make a PR to update the check with this method or are there other considerations?

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Dec 27, 2022

A PR along with steps to reproduce the issue so we can replicate would be appreciated!

@pijyoi
Copy link
Copy Markdown
Contributor Author

pijyoi commented Dec 27, 2022

The docs https://docs.python.org/3/library/sys.html#sys.base_prefix does indicate that the suggested method would work.

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.

Multiprocess does not work in a venv

3 participants