Comments (8)
Lucky enough to just have gotten a fresh machine that I'm setting up and I'm experiencing the same issue, exactly as described above, except instead of the terminal hanging, vf
simply isn't a command available in my path. Once i run eval (python -m virtualfish)
suddenly vf
is found, but then i get the warning.
using fish 3.6.1
and python 3.9.17
installed via pyenv
.
from virtualfish.
I tested this without --user
, in a new virtual environment, and I can't replicate this problem:
virtualenv vftest && source vftest/bin/activate.fish
python -m pip install virtualfish
mv ~/.config/fish/conf.d/virtualfish-loader.fish ~/
exec fish
vf install
exec fish
vf ls
In short, everything functions as expected when I follow the above steps. Perhaps try something similar, without --user
, and see if you see anything different?
from virtualfish.
Hey Justin, thanks for the quick reply,
Removing the --user
flag didn't improve anything for me. I had 2 questions based on what you posted above:
- is installing
virtualenv
first a requirement? While that logically would make sense, it's not listed in the docs, so I thought virtualfish would install its own dependencies. - Is the
virtualfish-loader
a requirement to get things working properly? I have the loader on my old machine, but porting it over had caused some issues as the script had a hardcoded version of python in it. I didn't see anything in the docs about it, so I elected to just delete it while setting things up.
from virtualfish.
from virtualfish.
got it. knowing that the script is added during installation helped. I had actually copied my fish config folder over from a previous machine so it probably explains it. I uninstalled and reinstalled virtualfish
via pip
and on reinstallation, i got a warning:
WARNING: The script vf is installed in '/Users/MY_USER/.local/bin' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
after adding /Users/MY_USER/.local/bin
to my path, vf
was available and i was able to run vf install
.
Though my issue sounds similar to the original author's post, I wonder if there is some idiosyncracy in the personal migration route I took from old machine to new π€· anyway, it's working for me now. I appreciate your efforts in troubleshooting.
from virtualfish.
Inside ~/.config/fish/conf.d/virtualfish-loader.fish
, VirtualFish stores the path to the Python interpreter used when VirtualFish was installed inside the VIRTUALFISH_PYTHON_EXEC
variable:
set -g VIRTUALFISH_VERSION 2.5.5
set -g VIRTUALFISH_PYTHON_EXEC /some/path/to/bin/python
source /Users/jm/Projects/virtualfish/virtualfish/virtual.fish
source /Users/jm/Projects/virtualfish/virtualfish/compat_aliases.fish
source /Users/jm/Projects/virtualfish/virtualfish/projects.fish
source /Users/jm/Projects/virtualfish/virtualfish/environment.fish
emit virtualfish_did_setup_plugins
As such, I imagine you will indeed experience problems if you copy that file to a new machine where that path does not point to a Python interpreter.
The vf install
step creates the ~/.config/fish/conf.d/virtualfish-loader.fish
file, with the contents being the lines shown above.
@CSJ7701: Instead of running vf install
, what happens if you manually create ~/.config/fish/conf.d/virtualfish-loader.fish
with the above contents (adjusting the VIRTUALFISH_PYTHON_EXEC
value appropriately) and then run exec fish
? Does vf
then behave as you would expect?
from virtualfish.
I think I have managed to solve my issue.
Instead of installing using pip, I installed virtualfish using my system's package manager. I then faced another issue, where I got an "invalid version" error from packaging.version.parse(). This seperate issue was mentioned in #238 and I fixed it by changing cmd = ["fish", "-c", "echo $version"]
in virtualfish/loader/cli.py to cmd = ["fish", "-N", "-c", "echo $version"]
.
from virtualfish.
Thank you, Christian, for taking a moment to report your findings and close this issue. Regarding the separate issue you mentioned, the just-released VirtualFish 2.5.6 should address it. π
from virtualfish.
Related Issues (20)
- Semi-automatic activation HOT 6
- Global requirements plugin: don't install by default on `vf tmp`
- auto_activation: 2.5.3 breaks auto-deactivation HOT 3
- can't create the new environment HOT 4
- Using tab for autocompletion with `vf activate` causes `direnv` to load and unload leading to cluttered output
- vf upgrade can sometimes fail
- Allow activating virtualenvs via path HOT 4
- Install doesn't work with python packaging 21.x
- Not autoactivating virtualenv when using tmux split pane HOT 4
- Dependency issue in Archlinux HOT 4
- What does vf check when it decides an env is "broken" ? HOT 5
- Cannot create new environment with python3.10, 3.9 and 3.8 works fine HOT 5
- bin folder isn't added to path correctly for Python3.10 (local/bin/ isn't used) HOT 7
- Improve docs for systems without a interpreter linked to `python` HOT 2
- vf upgrade: βsedβ cannot find [an undisclosed] file HOT 8
- check_fish_version() and `tabs` in fish configuration HOT 2
- `vf upgrade` yields error when virtual environment does not exist
- Migrate from `pkg_resources` to `importlib` HOT 1
- Cannot install using pipx HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from virtualfish.