Pycharm stubs not found

We are having problems trying to link the viktor SDK to PyCharm when using Linux WSL. We are missing the pip-cache folder mentioned in the documentation. Is this a know problem?
Right now we are getting an ‘Unresolved reference’ on everything from the viktor SDK.


Hi Enrique,

Are you using a virtual environment as isolation mode? In that case the dependencies of the app are not installed in the viktor-installs folder, but inside the virtual environment. If you are using a virtual environment you can select the project interpreter from the virtual environment folder. After doing this, Pycharm should automatically recognize the installed dependencies that are present in the virtual environment. I will adjust the docs to reflect the correct set up when using a virtual environment.

What is the Python version you are currently using? I have the idea that Pycharm currently doesn’t correctly recognize Python 3.10, which also gives me import errors. When switching to a different Python version I do get correct code completion.

Hi Raoul,
I am using venv as isolation mode and Python 3.8. Sadly I’m not able to select the venv folder as a project interpreter using Pycharm in combination with WSL. Could you share in here how you are able to do it?

In that case my guess is that you are using the community edition of Pycharm. As you can see from this link using a WSL based interpreter in Pycharm is a feature that is only available in Pycharm professional.

You could consider switching to Visual Studio Code as IDE, more information can be found here, if you don’t want to get Pycharm Professional.

With the introduction of the virtual environments it is also possible to use VIKTOR on Windows, without Docker.

Hi Enrique,

Are you using the most recent connexion of the CLI? I noticed for me the stubs have moved from home/puijterwaal/viktor-apps/viktor-installs to home/puijterwaal/.viktor/viktor-installs recently. I hope that fixes it!

What Raoul mentions is how to use the python3 version inside WSL for the python autocompletion, so you can ensure you have exactly the same installation and same packages between PyCharm and the cli. However, I find its not too much of a hassle to also have a second venv in windows for PyCharm. I guess that is what you were doing before?

kind regards,

Hi Paulien, I’m using venv in Windows now. Maybe is a second venv for Pycharm an option but I will leave as it is for now because of the time needed to change everything again. Thank you very much for your suggestion.

1 Like