has anyone installed lhapdf module successfully?

This is the place for queries that don't fit in any of the other categories.

has anyone installed lhapdf module successfully?

Postby Larz60+ » Tue May 20, 2014 10:51 pm


Has anyone successfully installed lhapdf? on fedora 20, I used sudo yum install lhapdf. It ran whthout incident, but I cannot see the module using help ( 'modules' ), and of course, cannot import it (in either python 2.7 or 3.3).

Posts: 1307
Joined: Thu Apr 03, 2014 4:06 pm

Re: has anyone installed lhapdf module successfully?

Postby metulburr » Tue May 20, 2014 11:47 pm

What is the exact output you get when you install it? What is the error you get when you import it? Is the package name python-lhapdf?
we will be moving to python-forum.io on October 1 2016
more details here
User avatar
Posts: 2244
Joined: Thu Feb 07, 2013 4:47 pm
Location: Elmira, NY

Re: has anyone installed lhapdf module successfully?

Postby Larz60+ » Wed May 21, 2014 2:06 pm


Here's the entire scoop. First the install dialog. I am using python 2.7 on Fedora 20 RHEL on an intel 64bit I-5 to test

Code: Select all
sudo yum install lhapdf.x86_64
Loaded plugins: langpacks, refresh-packagekit
Resolving Dependencies
--> Running transaction check
---> Package lhapdf.x86_64 0:5.9.1-4.fc20 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

 Package         Arch            Version                 Repository        Size
 lhapdf          x86_64          5.9.1-4.fc20            updates          660 k

Transaction Summary
Install  1 Package

Total download size: 660 k
Installed size: 1.7 M
Is this ok [y/d/N]: y
Downloading packages:
lhapdf-5.9.1-4.fc20.x86_64.rpm                             | 660 kB   00:15     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  Installing : lhapdf-5.9.1-4.fc20.x86_64                                   1/1
  Verifying  : lhapdf-5.9.1-4.fc20.x86_64                                   1/1

  lhpdaf.x86_64 0:5.9.1-4.fc20                                                 


I looked in the /usr/lib64/python2.7/site-packages directory and saw that lhapdf.py was indeed there.

However when I attempt simply import lhapdf from within idle, I get the following error:

Code: Select all
Traceback (most recent call last):
  File "<pyshell#0>", line 1, in <module>
    import lhapdf
ImportError: No module named lhapdf

next i tried to look at the available modules using
Code: Select all
help ( 'modules' )

I got the expected 'Please wait a moment while I gather a list of all available modules...', but the intrepter will sit there until the cows come home, for all practical purposes breaking idle.

After a little more looking, I found that this was a known bug (the idle freezing part) that was supposed to have been resolved, idle shoud not have frozen ( http://bugs.python.org/issue10060 ). Aparrently it's still there .
This leads me to the assumption that the lhpdaf module is broken.

-- so now, what else is available (that someone has used and knows works) for extracting not only text, but images as well from pdf files? Also, I would prefer one that will run on python 3.3


Posts: 1307
Joined: Thu Apr 03, 2014 4:06 pm

Return to General Coding Help

Who is online

Users browsing this forum: No registered users and 7 guests