Closed etienned closed 3 years ago
✅ I am using Python version 3.6 or higher.
Well, the reason the above item appears when filing an issue here is that Python 3.6+ is required, which as you can imagine precludes any expectations that VirtualFish will function correctly on Python 2.7, much less the wonky macOS version of Python 2.7.
I'm not sure what the best solution is either, but as a first step, I highly recommend using a supported version of Python. 😊
In general I'm using the current python version but I have a few old projects where it's not really possible or doesn't have sens to migrate them to python 3. Until recently those old projects, locally, were using the python 2 brew version and all was well, but now brew removed python 2, so they fallback at using the macos version.
Maybe the good solution is to reinstall a decent python 2 version with pyenv or asdf but that's an overhead for me as I'm using those virtualenv mostly to have code completion, access to code, etc. in my editor, the real projects are in Docker containers. Or another solution is to configure my linter/etc. to work with Docker, but I'm not a fan of this solution. I'll see...
Thanks for your answer!
Issue
When running
vf ls --details
I received this error:After digging a little bit the problem seems to come from the Apple provided python that, when called with
-V
to get the version, return the version string to stderr instead of sdtout (that's why we see the version above the error). I know that the real problem is with the macos' python but we can't change it. So what I did on line https://github.com/justinmayer/virtualfish/blob/master/virtualfish/virtual.fish#L343 is to redirect stderr to stdout like this:I'm definitely not sure it's the best solution but it works in my case.