SUMMARY At least with Kdevelop 5.5.0 it's not clear how to set up a workflow with a virtual environment STEPS TO REPRODUCE 1. python3 -m venv venvname 2. source venvname/bin/activate 3. pip install matplotlib 4. Create a project in KDevelop with import matplotlib OBSERVED RESULT Far from obvious how should venv be set up. Forums didn't really help. https://forum.kde.org/viewtopic.php?f=218&t=123855 And even need to read the forum to set up a basic feature is a problem. EXPECTED RESULT Setting up Python venv is documented. SOFTWARE/OS VERSIONS KDevelop 5.5.0, irrelevant because it's about documentation ADDITIONAL INFORMATION
You should be able to just set the venv's python interpreter as the python interpreter for the project. Does that work?
Unfortunately, it does not. You mean the Projects tool view > a python project context menu > Open configuration > Python settings > Python interpreter , yes? I've just copied it into a terminal and was able to import module that is not recognized by KDevelop. Any other suggestions? Just noticed that Konsole output is full of "/bin/sh: 1: indent: not found" for some reason.
Something in this script helped https://forum.kde.org/viewtopic.php?f=218&t=123855#p366196 But it's really bad UX to have to wrap the whole launch sequence into a long sh script just for a basic feature to work. Feel free to close this.