-
-
Notifications
You must be signed in to change notification settings - Fork 87
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
Use *.pth file instead of sitecustomize.py #4
Comments
Can you link me to a simple venv setup I can use for testing? |
You want me to upload a venv in github with a pth to show you how it works ? |
No, on second thought I almost have .pth working: when I upload it you can see if it meets your needs, and if it doesn't I'll look at setting up a venv. |
I've updated to 1.2.2, which allows you to use .pth files. I'm hoping that when it scans available install sites it finds the paths for venv. Check it out and let me know. |
With 3.7 you'll get:
|
I'm on 3.7 and it works ok, as it does in 2.7, so there's something else up with that, though I can't guess what it could be. Looking at the source - https://github.com/python/cpython/blob/2.7/Lib/site.py - |
Either it's not in the virtualenv, or it's not in Python on some OS. Linux maintainers have the bad habits of changing such details. |
It's probably this: pypa/pipenv#3824 |
Something similar yes, as I'm not using pipenv but the bug seems exactly the same. |
The
site-packages/sitecustomize.py
file is not reliable loaded for everybody. To ensure pretty_errors is loaded afterpython -m pretty_errors
, create asite-packages/pretty_errors.pth
file containing:If you don't want to use a *.pth, at least use
/home/user/.local/lib/python3.7/site-packages/usercustomize.py
, which is more likely to be imported and is meant for things like this. But *customize.py files are not imported in venv, which makes them pretty useless for real life Python usage.The text was updated successfully, but these errors were encountered: