Comments (4)
If you haven't defined VIRTUALFISH_HOME
, it defaults to $HOME/.virtualenvs
, so that is where the environment will be created when you run vf new watcher
. If you prefer for environments to live in /usr/local/venvs
, then you can add set -g VIRTUALFISH_HOME /usr/local/venvs
to your config.fish
file to change the default environment home directory.
Having virtual environments owned by different users isn't really something that was ever considered when developing VirtualFish, but in theory it shouldn't be a problem. If you want the virtual environment's files to be owned by the watcher
user, then I suppose you could create the environment first and then run sudo chown -R watcher $VIRTUALFISH_HOME/watcher
, as long as you remember to switch to that watcher
user in order to upgrade Watcher or perform other subsequent write-level environment operations.
from virtualfish.
Re: VirtualFish vs. Python's built-in venv module, the resulting virtual environments should be identical. VirtualFish uses Virtualenv, which in turn uses Python's built-in venv module under the hood. So you're getting the same end result. VirtualFish makes virtual environment management easier, so if that's what you're looking for, VirtualFish is a useful tool.
Pipsi? No. If you want to use a Python packaged CLI tool and have it be globally available (that is, not inside a virtual environment), then Pipx is a great solution for that. On my local workstation, for example, I use Pipx to install Ansible, HowDoI, Pipdeptree, Poetry, and Pre-commit. But since Watcher isn't a CLI tool — nor does it seem to be published as a PyPI package — so I don't think it would be a good fit for Pipx.
Poetry is great, and I use it every day to manage my Python projects, but once again, I don't think it's the right tool for this job.
Come to think of it, I'm not even sure Watcher needs any of this tooling — including virtual environments — because unlike nearly every other Python project you'll come across, Watcher doesn't appear to require being installed. It seems one merely uses Python to execute the watcher.py
file, so I don't think there would be much benefit to virtual environment isolation, since there are no dependencies to install.
from virtualfish.
Thanks for the detailed answer. I'd probably try to use a common group in order to avoid having to switch users when upgrading.
What would you do in a case like this? Try virtualfish? Stick to python built-in venvs? Use something like pipsi? Poetry? (never tried that one) IIRC, Watcher depends on a library thath needs Python <= 3.7, so that is another constraint.
from virtualfish.
Great! Thank you very much. You are right. In Fedora I just had to run dnf install python3.7
and change the unit file accordingly :)
from virtualfish.
Related Issues (20)
- 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
- vf install not working 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
- Shell startup is slow due to VirtualFish completions HOT 1
- `-N` / `--no-config option` in `check_fish_version` raises error in older Fish versions (checked with 3.1.2) HOT 3
- Support mise as Python provider
- Support for `uv` HOT 3
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.