# How to solve the problem "Unable to load cgns"

**URL:** <https://pyfr.discourse.group/t/how-to-solve-the-problem-unable-to-load-cgns/217>\
**Category:** General\
**Created:** [28 June 2018 08:09 UTC](https://pyfr.discourse.group/t/how-to-solve-the-problem-unable-to-load-cgns/217 "2018-06-28T08:09:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Qin](https://avatars.discourse-cdn.com/v4/letter/r/b2d939/32.png) [@Richard\_Qin](https://pyfr.discourse.group/u/Richard_Qin)\
**Post date:** [28 June 2018 08:09 UTC](https://pyfr.discourse.group/t/how-to-solve-the-problem-unable-to-load-cgns/217/1 "2018-06-28T08:09:52Z")

</div>

I’ve looked at that e-mail, whose link is [Google Groups](https://groups.google.com/forum/#!topic/pyfrmailinglist/1gzySxywKtQ).  
In that mail, an instruction called --export PYFR\_LIBRARY\_PATH=(your CGNS library path)  
Therefore, I wrote down this instruction.

`pyfr@ubuntu:~/users$ export PYFR_LIBARY_PATH="/home/cgns/lib"`  
However, it doesn’t work.  
The file in directory /home/cgns/lib is libcgns.so and libcgns.a.

The lib directory is created by me. It is not automatically created, because I didn’t find this directory in cgns/src dirsctory.  
Moreover, I didn’t install HDF5. Is that relevant to the problem?

The following is the problem same as the email above.  
`pyfr@ubuntu:~/users$ pyfr import yf17.cgns yf17.pyfrm`

```auto
Traceback (most recent call last):
File "/home/pyfr/miniconda3/lib/python3.6/site-packages/pyfr-1.7.5-py3.6.egg/pyfr/ctypesutil.py", line 32, in load_library
File "/home/pyfr/miniconda3/lib/python3.6/ctypes/ __init__.py", line 348, in __init__
self._handle = _dlopen(self._name, mode)
OSError: libcgns.so: cannot open shared object file: No such file or directory

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/pyfr/miniconda3/bin/pyfr", line 11, in <module>
load_entry_point('pyfr==1.7.5', 'console_scripts', 'pyfr')()
File "/home/pyfr/miniconda3/lib/python3.6/site-packages/pyfr-1.7.5-py3.6.egg/pyfr/ __main__.py", line 110, in main
File "/home/pyfr/miniconda3/lib/python3.6/site-packages/pyfr-1.7.5-py3.6.egg/pyfr/ __main__.py", line 121, in process_import
File "/home/pyfr/miniconda3/lib/python3.6/site-packages/pyfr-1.7.5-py3.6.egg/pyfr/readers/ __init__.py", line 19, in get_reader_by_extn
File "/home/pyfr/miniconda3/lib/python3.6/site-packages/pyfr-1.7.5-py3.6.egg/pyfr/readers/cgns.py", line 374, in __init__
File "/home/pyfr/miniconda3/lib/python3.6/site-packages/pyfr-1.7.5-py3.6.egg/pyfr/readers/cgns.py", line 34, in __init__
File "/home/pyfr/miniconda3/lib/python3.6/site-packages/pyfr-1.7.5-py3.6.egg/pyfr/ctypesutil.py", line 41, in load_library
OSError: Unable to load cgns

```

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [11 January 2021 19:54 UTC](https://pyfr.discourse.group/t/how-to-solve-the-problem-unable-to-load-cgns/217/2 "2021-01-11T19:54:42Z")

</div>

In future releases of PyFR the CGNS importer will not be supported.

---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [11 January 2021 19:54 UTC](https://pyfr.discourse.group/t/how-to-solve-the-problem-unable-to-load-cgns/217/3 "2021-01-11T19:54:52Z")

</div>



---

<div class="post-metadata">

**Author:** ![WillT](https://avatars.discourse-cdn.com/v4/letter/w/bc79bd/32.png) [@WillT](https://pyfr.discourse.group/u/WillT)\
**Post date:** [11 January 2021 19:55 UTC](https://pyfr.discourse.group/t/how-to-solve-the-problem-unable-to-load-cgns/217/4 "2021-01-11T19:55:03Z")

</div>


