-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Scripts and bin in bad location #1663
Comments
@andrewegel can you validate if this is still an issue with |
@arlaneenalra can you validate this no longer happens with master |
I don't think this should be still the case, but if so we'll reopen. |
This is definitely still happening:
|
@gaborbernat This is not fixed with
|
What about master? |
No joy in 20.0.7 either. |
Can you test |
No joy with 20.0.6 as well. We have a distutils.cfg file present that looks like:
It lives in It look like that config is leaking into virtualenv somehow ... |
Will give a try with that config and report back next week 👍 |
Hello, a fix for this issue has been released via virtualenv 20.0.8; see https://pypi.org/project/virtualenv/20.0.8/ (https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-8-2020-03-04). Please give a try and report back if your issue has not been addressed; if not, please comment here, and we'll reopen the ticket. We want to apologize for the inconvenience this has caused you and say thanks for having patience while we resolve the unexpected bugs with this new major release. |
This is still not fixed in
|
Can you provide detailed instructions to reproduce? Ideally a docker image, otherwise Python used, creation log, tree of the created virtual environment, etc 👍 also what configuration files you've used for distutils |
Closing until someone can reproduce this. I fail to do so on the environments accessible to me, so it's unactionable at the moment. If someone can create a reproducible example we'll reopen. |
Please re-open.
AFAIK MacOS doesn't have a "docker image"
So, MacOS Catalina 10.15.3 came with a stock /usr/bin/python3 (version 3.7.3) - It also came with what looks like a "light weight" virtual env:
This virtualenv doesn't have this issue. MacOS also will no longer allow edits under
Now I create it:
Debug Log is here: virtualenv-macos-20.0.9-debug-output.txt
virtualenv-macos-20.0.9-find-output.txt
This is stock configuration from Apple, so AFAIK, I'm not doing anything different, so I'm attaching what I think is what you're looking for: |
@andrewegel where does virtualenv-macos-20.0.9-distlib-sysconfig.txt come from? Path? |
I have Catalina and don't have that python install. How does one install on Catalina to be able to reproduce? |
/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/distlib/_backport/sysconfig.cfg
This came pre-installed with the laptop that was provisioned to me by my employer, so I don't have a definitive answer, I think it was one of the https://developer.apple.com/download/more/ I've tried downloading one, installing and testing, but that didn't seem to put anything at /use/bin/python3 or anything - so I guess we have to chock this up to w/e environment I'm running, and is therefore now a wide-spread bug. If I find time to dig deep into this issue, I'll send a PR with a fix, but no promises. |
Here's a small repo that reproduces this issue in a linux based docker container: https://github.com/arlaneenalra/broken-virtualenv-example With short README containing instructions on how to duplicate the issue. This is definitely still a problem with 20.0.9 |
@arlaneenalra @andrewegel thanks for the information provided, I believe this will now be finally fixed by #1705; please check and report back if not. |
Ignore configuration file parsing when getting distutils data. Resolves #1663. Signed-off-by: Bernat Gabor <[email protected]>
Hello, a fix for this issue has been released via virtualenv 20.0.10; see https://pypi.org/project/virtualenv/20.0.10/ (https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-10-2020-03-10). Please give a try and report back if your issue has not been addressed; if not, please comment here, and we'll reopen the ticket. We want to apologize for the inconvenience this has caused you and say thanks for having patience while we resolve the unexpected bugs with this new major release. |
@gaborbernat This appears to pass in the Docker example and when I use the custom brew based python setup I mentioned in #1663 (comment). So at least my issue appears to be fixed. It's possible there are/were other ways to trigger the same behavior, so I'd like to see @andrewegel comment prior to this being called definitely fixed. |
I just tried version |
@andrewegel please post the |
The lock file is empty:
|
@andrewegel You might want to check for a file like:
or some variant of those .. There are other config fields in distutils.cfg that could potentially have similar impact https://docs.python.org/3.7/install/index.html?highlight=distutils%20cfg#distutils-configuration-files Could also be something else, but knowing if a similar file exists and it's contents could be helpful. In theory, a similar file could be injected in to the docker container just like I did for my test case. |
@andrewegel can you post the output of this script https://github.com/pypa/virtualenv/blob/master/src/virtualenv/discovery/py_info.py against /Library/Developer/CommandLineTools/usr/bin/python3? It should be a JSON. |
I'm seeing a similar issue using Xcode's Python3, provided by Xcode Command Line Tools, macOS Catalina (10.15.2)
Virtualenv 20.0.10
New virtual environment
Directory structure for generated virtual environment
Directory structure (?) breaks virtual environment
Python information from
|
macOS Mojava to which I have access no longer ships python 3, so cannot validate. But the issue seems the distutils_install being off. Can you post:
|
|
Btw, for me this only seems to affect |
@biochimia can you try with https://github.com/pypa/virtualenv/pull/1711/files? Turns out there's a lot more at fault than just bad paths. That PR though should be a rough estimate of solution. |
Checking out a12ed2a from #1711, it looks much better:
(Using
So, #1711 seems to work great here with Xcode's Command Line Tools' For comparison, in the same system and the same
|
Resolved via #1711, we'll release it soon. |
Hello, a fix for this issue has been released via virtualenv 20.0.11; see https://pypi.org/project/virtualenv/20.0.11/ (https://virtualenv.pypa.io/en/latest/changelog.html#v20-0-11-2020-03-18). Please give a try and report back if your issue has not been addressed; if not, please comment here, and we'll reopen the ticket. We want to apologize for the inconvenience this has caused you and say thanks for having patience while we resolve the unexpected bugs with this new major release. |
Reporting the same bug here on MacOS, only I'm highlighting the old vs new-unexpected behavior in a (hopefully) easy reproduction case:
Now at this point I expect the python and pip "binaries" to be under
~/.mac-os-venv/bin/*
, but they now seem to be under~/.mac-os-venv/<sourced-prefix>/bin/*
:This behavior change messes with tools like
tox
that expect to have thepip
binary under<ENV-ROOT>/bin
- Reading the changelog I didn't see anything mentioning this behavior changeIf this is un-related, I can file a separate bug, but it seems suspect that we're getting hung up on the same issues relating to "prefixes" here. Attached is my debug output of
virtualenv-20.0.4
command creating a virtualenv:virtualenv-debug-output-issue-1632.txt
Originally posted by @andrewegel in #1632 (comment)
PS. moved here as it's a new issue.
The text was updated successfully, but these errors were encountered: