Python packages not identified

Which tool versions are you using?

Platform: v23.07.0
Python: v3.11.4
Isolation mode: docker (WSL)

Current Behavior

I’ve run the 1st app as in the website tutorial and the beam was showing and all okay. Then in the same tutorial, when I copy and paste the same more advanced script (which uses some packages) I have a problem that these packages are not identified when I run the app. Specifically, when I run “viktor-cli start” in Ubuntu it ends with this error:
“Traceback (most recent call last):
File “viktor_connector/connector.pyx”, line 692, in connector.ManifestHandler.run
File “/usr/src/app/app.py”, line 3, in
import plotly.graph_objects as go
ModuleNotFoundError: No module named ‘plotly’”
This is despite that plotly is installed in my python as I used to do usually (pip install plotly), but am I missing anything here as I am running Viktor in wsl ?

Expected Behavior

It should just use the installed package plotly!

Context (optional, but preferred)

I am very new to Viktor, but I have used Python a bit in the past, so I am familiar with python packages etc (although not in advanced level). I am just running the tutorial here (Getting Started - Create your first app | VIKTOR Documentation).

Any help is much appreciated as I really don’t know what to do.

Thanks,
Ahmed

Dear ahmsa87,

Welcome to the VIKTOR Community Forum. The problem you encountered is quite a common problem, and we’ve documented this in our FAQ: Frequently Asked Questions | VIKTOR Documentation

To give you a bit of background information why a simple pip install doesn’t work:

When creating and installing your ‘first-app’, the viktor-cli creates a virtual environment behind the scenes and installs all packages that are included in the requirements.txt file. If you use pip install, the python package does not end up in this virtual environment, so we encourage you to use the viktor-cli to install packages.

@kvangiessen That has worked now, many thanks!