Skip to content
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

bin folder isn't added to path correctly for Python3.10 (local/bin/ isn't used) #232

Closed
4 tasks done
jjnesbitt opened this issue Sep 16, 2022 · 7 comments
Closed
4 tasks done
Labels

Comments

@jjnesbitt
Copy link

  • I am using Fish shell version 3.1 or higher.
  • I am using Python version 3.6 or higher.
  • I have searched the issues (including closed ones) and believe that this is not a duplicate.
  • 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

image

@jjnesbitt jjnesbitt added the bug label Sep 16, 2022
@justinmayer
Copy link
Owner

Hi Jacob. I have never seen this behavior. Some questions:

  1. How did you install Python 3.10?

  2. Is that the only Python interpreter on your system? If not, provide details about others.

  3. How exactly did you install VirtualFish?

  4. What version of Virtualenv do you have installed?

  5. If you use Virtualenv to manually create a new virtual environment, do you also see […]/local/bin instead of […]/bin?

@jjnesbitt
Copy link
Author

  1. I installed Python 3.10 through APT
  2. I also have 3.8.10 and 3.9.14 installed, both also through APT.
  3. I installed virtualfish through pip as the docs specify, using python3.8 (my system default).
  4. My virtualfish version is 20.8.1
  5. 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.

@simon-brantonhousley-caribou

I am also having this issue
Ubuntu 22.04

  1. Python 3.10.4 installed via apt
  2. Yes
  3. Installed via pip, using the docs
$ virtualenv --version
virtualenv 20.16.5 from /home/myhomedirectory/.local/lib/python3.10/site-packages/virtualenv/__init__.py
  1. Yes
$ vf --help
VirtualFish 2.5.5
...

@bhargavkakadiya
Copy link

I am also having the same issue after installing it on pop-os 22.04 with python3.10

@bhargavkakadiya
Copy link

I was able to resolve as well with this #232 (comment)
Thank you @AlmightyYakob

@justinmayer
Copy link
Owner

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.

@justinmayer
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants