user19316680
user19316680

Reputation:

How to open and view CGNS files on Windows 10 after installing PyCGNS python package?

After installing PyCGNS python package from Anaconda distribution, I am not able to open CGNS files as recommended in the following pages using the command line CGNS.NAV or cg_look:

Browsing your CGNS tree with NAV

Here is the error message I am receiving whether I am running the command line in Git Bash, Powershels, or CMD:

CGNS.NAV: FATAL error, cannot import qtpy.QtCore...

Hints:

  1. pyqt5 is already installed

  2. print(sys.path)

'C:\\ProgramData\\Anaconda3\\Scripts', 'C:\\ProgramData\\Anaconda3\\python38.zi
p', 'C:\\ProgramData\\Anaconda3\\DLLs', 'C:\\ProgramData\\Anaconda3\\lib', 'C:\\
ProgramData\\Anaconda3', '', 'C:\\ProgramData\\Anaconda3\\lib\\site-packages', '
C:\\ProgramData\\Anaconda3\\lib\\site-packages\\vboxapi-1.0-py3.8.egg', 'C:\\Pro
gramData\\Anaconda3\\lib\\site-packages\\win32', 'C:\\ProgramData\\Anaconda3\\li
b\\site-packages\\win32\\lib', 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\
Pythonwin', 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\IPython\\extensions
', 'C:\\Users\\user_name\\.ipython']

Upvotes: 1

Views: 536

Answers (1)

robni
robni

Reputation: 1066

You need to install PyQT. Open the cmd.exe prompt from the anaconda navigator (in the home menu).

Execute this command:

conda install pyqt5

If you already had install it, maybe it's not in your enviroment.

Please post the output from:

print(sys.path)

Find out where PyQt5 is installed and ad it to your path-enviroment. You will find plenty of howto's in the internet. Here is one of them (Source: https://www.educative.io/edpresso/how-to-add-python-to-path-variable-in-windows):

Right-clicking This PC and going to Properties.

Clicking on the Advanced system settings in the menu on the left.

Clicking on the Environment Variables button o​n the bottom right.

In the System variables section, selecting the Path variable and clicking on Edit. The next screen will show all the directories that are currently a part of the PATH variable.

Clicking on New and entering Python’s install directory.

Upvotes: 0

Related Questions