Git Product home page Git Product logo

Comments (4)

justinmayer avatar justinmayer commented on August 31, 2024 1

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.

justinmayer avatar justinmayer commented on August 31, 2024 1

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.

stormwatch avatar stormwatch commented on August 31, 2024

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.

stormwatch avatar stormwatch commented on August 31, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.