bin folder isn't added to path correctly for Python3.10 (local/bin/ isn't used)
- [x] I am using Fish shell version 3.1 or higher.
- [x] I am using Python version 3.6 or higher.
- [x] I have searched the issues (including closed ones) and believe that this is not a duplicate.
- [x] If related to a plugin, I prefixed the issue title with the name of the plugin.
- OS version and name: Ubuntu 20.04.5 LTS
- Fish shell version: 3.5.1
- VirtualFish version: 2.5.3
Issue
When creating a venv with python3.10 (in my case 3.10.7), the bin folder is located under <venv>/local/bin/, not simply <venv>/bin. I've looked at the virtualfish source code a bit and it seems this is never explicitly handled, it's just assumed that bin. This is also evidenced by the fact that echoing $PATH shows bin instead of local/bin. And yes, python3.10 is in my path.
To reproduce:
- Install virtualfish
- Install python3.10

Hi Jacob. I have never seen this behavior. Some questions:
-
How did you install Python 3.10?
-
Is that the only Python interpreter on your system? If not, provide details about others.
-
How exactly did you install VirtualFish?
-
What version of Virtualenv do you have installed?
-
If you use Virtualenv to manually create a new virtual environment, do you also see
[…]/local/bininstead of[…]/bin?
- I installed Python 3.10 through APT
- I also have
3.8.10and3.9.14installed, both also through APT. - I installed virtualfish through pip as the docs specify, using python3.8 (my system default).
- My virtualfish version is
20.8.1 - Indeed I do.
I'd also like to note that I followed these steps, and it appears to have fixed my issue (there is now a bin folder at the venv root level). However the local/bin folder still exists (and contains what it did before), so I think it's still fair to check that.
I am also having this issue Ubuntu 22.04
- Python 3.10.4 installed via apt
- Yes
- Installed via pip, using the docs
$ virtualenv --version
virtualenv 20.16.5 from /home/myhomedirectory/.local/lib/python3.10/site-packages/virtualenv/__init__.py
- Yes
$ vf --help
VirtualFish 2.5.5
...
I am also having the same issue after installing it on pop-os 22.04 with python3.10
I was able to resolve as well with this https://github.com/justinmayer/virtualfish/issues/232#issuecomment-1251261914 Thank you @AlmightyYakob
As seen above, I have posted a comment asking Bernát, maintainer of Virtualenv, if he knows why this situation occurs. I have examined several ways of handling this, and all of them are messier than I would like — particularly when it is not clear why this seemingly-odd state happens in the first place.
Assuming we are able to collect more information regarding why this occurs, then perhaps it will make sense to consider handling this state within VirtualFish.
According to the maintainer of Virtualenv, this situation could be caused by an old/corrupted cache folder and isn't something that should happen under normal circumstances. Ergo, I don't think it makes much sense to handle this odd state-of-affairs explicitly in VirtualFish.