spine-tools / Spine-Toolbox

Spine Toolbox is an open source Python package to manage data, scenarios and workflows for modelling and simulation. You can have your local workflow, but work as a team through version control and SQL databases.
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
73 stars 17 forks source link

Installation problem: pipx not found in path, spinetoolbox not recognized as a program etc. #1481

Closed manuelma closed 3 years ago

manuelma commented 3 years ago

When following the recommended installation steps, things go well until step 5, pipx install spinetoolbox, where users may get pipx not recognized as a program. Does this mean python -m pipx ensurepath didn't do its job?

Running python -m pipx install spinetoolbox works, but then spinetoolbox doesn't work (spinetoolbox not recognized as a program). This is because the bin folder where the spinetoolbox executable is placed is not in the path.

Installation instructions should be foolproof and it seems that currently we don't cover some corner cases. Any ideas? @ererkka @PekkaSavolainen

ptsavol commented 3 years ago

Duplicate of #1448? I closed it because bugs in pipx are not our concern. Maybe we should not mention anything about Windows store python in our readme though.

We should probably remove everything about pipx in the readme too and just tell them to use pip install spinetoolbox.

manuelma commented 3 years ago

Duplicate of #1448?

Likely. The thing is, we don't provide any help to our users. They just see an error, it's a very bad experience to be honest. We need a real solution, a fully foolproof set of steps that welcome users to our application!

ptsavol commented 3 years ago

Commit coming up

ptsavol commented 3 years ago

Installation instructions from PyPI should be foolproof now. See also a new thing in troubleshooting section.

manuelma commented 3 years ago

Thank you @PekkaSavolainen

I think this needs more discussion, I mean, what happens now if they are using their python for something else? Wasn't the purpose of using pipx to ensure isolation within an environment or something like that?

Not to panic, but webinars attendants might be looking at these instructions soon, we need to get our story straight. I'm not saying I have a solution, just want things to work smoothly without disappointments.

ptsavol commented 3 years ago

Yeah, that was the purpose of what pipx was supposed to do but it would be nice if it would work with Windows store Python's as well. As such, we cannot really recommend users to do that as the primary installation option.

I did add a mention about pipx and ana/miniconda to troubleshooting section for this purpose. It's perfect now. Pekka out.

jkiviluo commented 3 years ago

It's a pipy that pipx doesn't work as intended. I feel it's important to setup an environment for Toolbox, since many researchers nowadays use Python for multiple purposes. For me, conda has been working mostly fine for that purpose.

I understand that this is what we have for now, but I also feel the instructions needs to include that environment option too.

ghost commented 3 years ago

That’s right. Installing stuff globally is a potential source of a lot of trouble, and isolation (with pipx or virtual/conda envs) really is important. Options:

  1. Instruct users to create a virtual environment (or use conda) and install there
  2. Instruct to use pipx, but tell how to add ~/.local/bin (where pipx puts the executables) to PATH
ghost commented 3 years ago

This is hopefully fixed now.