virtualfish: VirtualFish is not accessible after simple pip install
- 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.
- OS version and name: macOS Catalina version: 10.15.4
- Fish shell version: 3.1.2
- VirtualFish version: 2.2.3
Issue
I am using VirtualFish for a while but recently I have changed my computer (given by the company) and I needed to configure my environment once again after a long time not doing that.
I have followed the instruction placed in README.md file and unfortunately, I found a problem with triggering the second command 😕
The main problem is that vf command can’t be recognized as a global command for my machine. I suppose that this problem can be connected somehow with my computer, not with a particular bug in the library but the installation process with the usage of pip package installer didn’t inform me about that 🤷♀️
I have installed VirtualFish with the usage of directly run cli.py module with the install argument and it works like a charm 🙌 but I am pretty sure that something should be updated: either documentation or code 🧐
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 22 (11 by maintainers)
@whwkong: I recently added that Fish version check because folks were filing issues that were caused by using outdated Fish versions. As you can see in the relevant code, the version comparison should not produce the result you encountered. Here’s what happens when I run that code in a Python REPL:
So I am baffled as to why that version comparison test failed in your case. Nonetheless, I suppose I can remove the
exit()directive, effectively changing the Fish version check into merely a warning instead of preventing further VirtualFish use.In the interim, in you should be able to comment out the check_fish_version() call on line 35 in /home/william/.local/lib/python3.7/site-packages/virtualfish/loader/cli.py and then run the following command to install the VirtualFish loader:
I would really like to understand why the version check failed in your case, so if you find any information that would have led to that result, by all means please let me know.
For what it’s worth, I cannot replicate the behavior you mentioned:
In your case, Pip-installing VirtualFish does not result in having the
vfcommand available on$PATH— I don’t know why. As you said, it could be something particular to your system. What is the path to the Python interpreter you used to Pip-install VirtualFish? What is displayed when you run the following command?If someone successfully installs a Python package via Pip, but then that package’s entry point (in this case,
vf) is not subsequently available to the user for some reason, then there isn’t really anything we can do to tell the user that something didn’t work correctly. We have no way to determine that. While in theory it is possible to use a Setuptools post-installation step to check for that condition, we switched from Setuptools to Poetry, the latter of which intentionally does not support arbitrary Python code execution during package installation (for security reasons).In short, it would helpful to determine why installing the
virtualfishpackage did not result invfbeing available on your$PATH, because that is what should have happened.