austin-ultratesting / ultranauts-istqb-studyguide

A python based project to run Jupyter notecards for ISTQB foundation exam materials. It also uses automation to collect and update vocabulary from the official ISTQB website
GNU General Public License v3.0
0 stars 0 forks source link

Can't get the project to run. Jupyter notebooks missing from requirements? #1

Open morphatic opened 1 month ago

morphatic commented 1 month ago

Hey, so I have only used Jupyter Notebooks a few times so I don't know from memory how to get it running. It would be a good idea to put a section in your README.md file that provides instructions for how to get your project to run. Here's what I've done so far:

  1. Cloned the repo
  2. cd into the repo folder
  3. Run python -m venv venv to create a virtual environment
  4. source ./venv/Scripts/activate to activate it
  5. pip install -r requirements.txt to install the requirements
  6. tried running jupyter notebook but got error message "jupyter: command not found"

My guess is that you installed Jupyter globally on your system and not as part of the requirements for the project? Especially if your project is not fully self-contained and needs the user to have something installed on their system, this needs to be part of your documentation. Even better would be to NOT rely on anything other than python being installed globally on the user's system and make sure that everything your project needs is listed in your requirements file.

What should I do next?

morphatic commented 1 month ago

Okay, so I went back and read the README.md file more carefully and saw the "Kernel setup" section. I was not familiar with the ipython command, and which ipython showed that it wasn't already installed as part of the project requirements, so I looked at the ipython homepage and it appears to be something else that should be included in requirements.txt?

morphatic commented 1 month ago

Update. Here's some more things I tried.

Within the activated virtual environment:

  1. pip install ipython
  2. ipython kernel install --help gave "no module named 'ipykernel'"
  3. pip install ipykernel
  4. ipython kernel install --help showed the help documentation
  5. ipython kernel install --user --name=venv gave the message "Installed kernelspec venv in C:\Users\Morgan\AppData\Roaming\jupyter\kernels\venv"
  6. which jupyter shows that the jupyter command is now installed in my venv
  7. jupyter notebook gave an error "Jupyter command jupyter-notebook not found."

Not wild about seeing things get installed into directories outside of the project folder, i.e. ~/AppData/Roaming/.

Pet peeve: I don't like it when projects are not fully self-contained. As a developer who uses A LOT of different programming languages and has lots of projects running concurrently, I'm terrified of projects that will install something globally on my system (especially without notification) and cause my other projects to suddenly stop working correctly. I find the Jupyter notebook documentation (ESPECIALLY Anaconda) seem to assume that they can just take over your whole computer. I've ruined several machines in the past by installing Anaconda, only to have it totally rewrite my PATH and screw up how my system is configured.

Gotta get back to other things now. Please let me know how I can get your project running in a way that doesn't install anything outside of the project folder.

austin-ultratesting commented 1 month ago

@morphatic

I have updated the requirements to include the modules for IPython and Jupyterlab. I am going to try a fresh clone of the project and see if that doesn't get things working on my end.

I might need to ask a colleague on getting some help with anything else with setting up the dependencies of a Python based project. I thought this would be more straightforward but that always seems to be a surprise on my end as usual.