-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't find Qt platform plugin after install from source #75
Comments
Hi, this may end up being a non-Tierpsy-specific issue. Some googling brought me here, where they seem to have a solution: Let me know if that helps, and I'll add it to the Known Issues section. That said, we've had multiple users have problems installing Tierpsy from source on Windows. Unless you have a strong need to make changes to the code Docker remains the preferred method of installation on Windows |
Thank you! First I tried Then I uninstalled my Visual Studio build tools and reinstalled the full Visual Studio IDE. This created the Several of the other answers in that StackOverflow post don't seem to apply to this specific case - for example, one answer is targeted at people using PySide2. I went Control Panel --> System and Security --> System (alternatively, Windows Key --> About your PC) --> Advanced System Settings --> Advanced tab (alternatively, Windows Key -->Edit the system environment variables) --> Environment Variables and added a system variable QT_PLUGIN_PATH with value C:\Users\myusername\miniconda3\envs\tierpsy\Library\plugins. This didn't work. But after exiting and starting a new conda session, it worked. However, commenters on the post mention that this method will cause errors for programs like Dropbox. One method I wasn't able to try is described here and here (I think they're the same strategy). What would be the "project interpreter folder" in Tierpsy's case? |
Hi, sorry for the late reply, I was on annual leave. PySide2 and PyQt are basically the same thing so I didn't think too much of there being examples for both in the stackoverflow link. I'm glad setting the environment variable worked. I understand the concern that it might cause issues with other programs. If you're getting problems with that, a solution should be to set the environment variable temporarily, in a tiny script that activates the conda environment, sets the QT_PLUGIN_PATH variable and starts Tierpsy. This way, the env variable would not affect anything else in Windows. See here for the syntax to use and here and here for tips on how to make a batch script that uses the conda interrpreter (I did not test this, I do not have a windows machine on hand at the moment). That said, this type of problems is what led us to develop the Docker installation option 😃 |
Thanks for the reply! I believe I've found a good solution. First, I followed the windows section of this conda documentation on managing environments. In the Windows command prompt, I changed directory to C:\Users\myusername\miniconda3\envs\tierpsy and then copied the commands in the tutorial. The mkdir commands failed since the activate.d and deactivate.d folders already existed. Then I used Visual Studio Code to edit the files, so that activate.d\env_vars.bat contained
and deactivate.d\env_vars.bat contained
This did not fix the problem. I'm not sure exactly what content needs to go in the batch files. I also tried and failed with
and
Nevertheless, this StackOverflow answer worked. But before starting over, I left the two env_vars.bat files unchanged and ran Anyways, I deleted the batch files, activated the environment, and ran
After deactivating, the Interestingly, after applying this solution, the “Environment Variables” page (accessible via Windows key → “Edit the system environment variables” → "Environment Variables") does not display any system variable for QT_PLUGIN_PATH. So perhaps this solution eliminates compatibility issues with Dropbox. Regardless, issuing the command Perhaps the Qt plugin path error only occurs with Windows 11? When I initially raised this issue, I was using a Dell XPS 13 with Windows 11. Later, I installed Tierpsy from source on a Dell Inspiron 3583 with Windows 11, and still encountered the Qt plugin error. Notably, I did not encounter this error when I first installed Tierpsy from source on this same Inspiron 3583 running Windows 10 about 1.5 years ago. However, that was also with an older version of Tierpsy. One last piece of good news: the StackOverflow answer suggests that the YML file can make this environment variable fix happen automatically! |
TLDR: to fix the Qt error, activate the tierpsy environment and run I modified my tierpsy_windows.yml file, adding the following two lines to the bottom of the file:
Then I deleted my Tierpsy environment and recreated it with However, the environment variable didn't disappear (based on
Thus it seems that modifying the YML file is mostly unhelpful. I may be wrong. EDIT: after reading the documentation more carefully, it seems that the environment variable isn't supposed to disappear after deactivating the environment. Rather, it stays around for that particular environment, but only affects that particular environment. So |
Hi @jskat, it's great you solved the issue and thank you for the extensive testing. I agree that the
I'll close the issue for now - thank you :) |
Hello @luigiferiani,
I downloaded the repository from ZIP, then successfully ran
conda env create -f tierpsy_windows.yml #[Windows 10]
conda activate tierpsy
pip install -e .
as described in the instructions.
However, when I run
tierpsy_gui
, the following error appears:This is on a Dell XPS 13 with Windows 11. Any idea why this is happening?
The text was updated successfully, but these errors were encountered: