Installing PDFgui

783 views
Skip to first unread message

Olivia Aalling-Frederiksen

unread,
Apr 6, 2018, 12:10:40 PM4/6/18
to diffpy-users
Hi, 

I am trying to install PDFgui. I've installed Anaconda and the latest version of PDFgui on my mac.
When I try run pdfgui, I get the following error message:

ImportError: No module named hyperlink
OnInit returned false, exiting...

Could you let me know how to solve the problem?

Best regards Olivia 

Pavol Juhas

unread,
Apr 6, 2018, 1:22:19 PM4/6/18
to diffpy...@googlegroups.com
On Fri, Apr 06, 2018 at 12:45:55AM -0700, Olivia Aalling-Frederiksen wrote:
...
> I am trying to install PDFgui. I've installed Anaconda and the latest
> version of PDFgui on my mac.
> When I try run pdfgui, I get the following error message:
>
> ImportError: No module named hyperlink
> OnInit returned false, exiting...

Hi Olivia,

This happens because Anaconda has upgraded the wxpython GUI
library to version 4, but PDFgui needs version 3. I have
updated the PDFgui Anaconda package to require wxpython 3.

Can you try to reinstall PDFgui?

$ conda remove diffpy.pdfgui
$ conda install -c diffpy diffpy.pdfgui

If that does not work, another option is to explicitly
request wxpython 3 as follows:

$ conda install -c diffpy diffpy.pdfgui wxpython=3

Hope this helps,

Pavol

--
Dr. Pavol Juhas
Computational Science Initiative
Brookhaven National Laboratory
P.O. Box 5000
Upton, NY 11973-5000
tel: +1-631-344-3594
fax: +1-631-344-5751

Olivia Aalling-Frederiksen

unread,
Apr 17, 2018, 8:22:01 AM4/17/18
to diffpy-users
Thank you! this was a great help for me. 

Long Yang

unread,
May 29, 2018, 2:25:25 PM5/29/18
to diffpy-users
Hi Pavol,

I am trying to install PDFgui on a new computer. But I got some errors. Could you please help with it? It also looks like problem with wx package.
I use Ubuntu 18.04 system, Anaconda 5.1 for Python 3.6.

After I create py27 conda environment and installed pdfgui, I type "pdfgui" to run it but failed:
```
Traceback (most recent call last):
  File "/home/ly0/anaconda3/envs/pdf/bin/pdfgui", line 11, in <module>
    sys.exit(main())
  File "/home/ly0/anaconda3/envs/pdf/lib/python2.7/site-packages/diffpy.pdfgui-1.1.2-py2.7.egg/diffpy/pdfgui/applications/pdfgui.py", line 116, in main
    import diffpy.pdfgui.gui.Main as guimain
  File "/home/ly0/anaconda3/envs/pdf/lib/python2.7/site-packages/diffpy.pdfgui-1.1.2-py2.7.egg/diffpy/pdfgui/gui/Main.py", line 19, in <module>
    import wx
  File "/home/ly0/anaconda3/envs/pdf/lib/python2.7/site-packages/wx-3.0-gtk2/wx/__init__.py", line 45, in <module>
    from wx._core import *
  File "/home/ly0/anaconda3/envs/pdf/lib/python2.7/site-packages/wx-3.0-gtk2/wx/_core.py", line 4, in <module>
    import _core_
ImportError: /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates 
```

And I `conda list` to check the version of wxpython, it is 3.0 correctly as you said.
`wxpython                  3.0.0.0                  py27_2 `

What would be the solution?

Thank you!
Long

Pavol Juhas

unread,
May 29, 2018, 3:24:39 PM5/29/18
to diffpy...@googlegroups.com
On Tue, May 29, 2018 at 11:25:24AM -0700, Long Yang wrote:
...
> I am trying to install PDFgui on a new computer. But I got some errors.
> Could you please help with it? It also looks like problem with wx package.
> I use Ubuntu 18.04 system, Anaconda 5.1 for Python 3.6.
>
> After I create py27 conda environment and installed pdfgui, I type "pdfgui"
> to run it but failed:
...
> ImportError: /usr/lib/x86_64-linux-gnu/libharfbuzz.so.0: undefined symbol:
> FT_Get_Var_Blend_Coordinates

Hi Long,

This happens, because of incompatibility between system and Anaconda
dynamic libraries harfbuzz and freetype (AFAIK these are for font
rendering). Anaconda is set up to always prefer its own dynamic
libraries. It seems that your Anaconda environment has an old
version of freetype, but no harfbuzz. Upon loading wxpython,
the system finds its own harfbuzz version which needs a recent
freetype, but instead finds an old one from Anaconda, hence
the crash.

A possible fix is to manually install harfbuzz to your conda
environment

conda install -n py27 harfbuzz

which should install an older harfbuzz and thus avoid the new
one from Ubuntu. Another option is to remove the Anaconda
freetype and then use both new harfbuzz and freetype from Ubuntu:

conda remove --force freetype

I hope one of these works. Best,

Long Yang

unread,
May 30, 2018, 11:02:20 AM5/30/18
to diffpy-users
Thank you very much, Pavol! I tried your first solution and it works.
Reply all
Reply to author
Forward
0 new messages