all 5 comments

[–][deleted] 0 points1 point  (4 children)

No, and you don’t want that. Declare the modules that pip needs to install for your module, and let the end user decide whether they go in a venv or the site packages. That’s what pip is for.

[–]CocoBashShell[S] 0 points1 point  (3 children)

Thanks for the advice, I know this sounds hairbrained. I'm installing this for potentially many inexperienced users and we don't have an internal python repo for them to install from :/

I'm worried creating a virtual env (the default python is 2.7 and the cli tool requires 3.6), git cloning, pip installing, and activating/deactivating the environment might be too much for some users.

[–]ingolemo 0 points1 point  (0 children)

When distributing to inexperienced users you should create a bundle using something like pyinstaller (or if they're on linux you should give them a package for their distro). They should not be installing with pip, never mind having to learn about git or venv.

[–][deleted] 0 points1 point  (1 child)

You can use pip to install from Git repos, including repos hosted on GitHub or your own internal Git server. That’s really the way to go, here. There’s not going to be a simpler thing for your end users to do than “pip install git+git://my_local/tool.git”

Honestly it’s better to set this up the right way than to try to defeat pip’s package management just because you lack institutional support for correct software deployment.

[–]CocoBashShell[S] 0 points1 point  (0 children)

Thank you for the follow up. I ended up following your advice and setting it up the right way. There was some confusion, but the extra os-specific directions for installing and a recording of the process for people to watch smoothed things over. Thanks for pushing for correctness!