justinmayer / virtualfish

Fish shell tool for managing Python virtual environments

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

vf install not working

CSJ7701 opened this issue · comments

  • 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: 6.3.5-arch1-1

  • Fish shell version: fish, version 3.6.1

  • VirtualFish version: 2.5.5

Issue

Installed virtualfish with: python -m pip install --user virtualfish
attempted to run: vf install
Terminal hangs (I waited about 5 minutes).
Ctrl+c, received traceback:

Traceback (most recent call last):
  File "/home/csj7701/.local/bin/vf", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/csj7701/.local/lib/python3.11/site-packages/virtualfish/loader/cli.py", line 47, in main
    check_fish_version()
  File "/home/csj7701/.local/lib/python3.11/site-packages/virtualfish/loader/cli.py", line 32, in check_fish_version
    fish_version = subprocess.check_output(cmd).decode("utf-8").strip()
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 466, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 550, in run
    stdout, stderr = process.communicate(input, timeout=timeout)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/subprocess.py", line 1194, in communicate
    stdout = self.stdout.read()
             ^^^^^^^^^^^^^^^^^^
KeyboardInterrupt

The same thing happens for any command beginning with vf.

I tried running eval (python -m virtualfish).
This works - I am now able to run vf install (It tells me VirtualFish is already installed) as well as other vf commands.
I am able to add this command to my fish config, but now whenever I start my terminal I get a warning stating that virtualfish is installed using an old method, and that I should remove this line from my config and run vf install.
If I remove that line and restart my console, I go back to not being able to run vf install.

I would like to either run vf install and have it work, or use the eval... command without getting an error.