Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
New to Linux, new to python...have no idea what I'm doing. Now that that's out of the way....
I have a computer at work with a new installation of Red Hat Enterprise 6.1. I tried starting python - that works (ver 2.5.4). I then tried typing 'import numpy' and received this error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/site-packages/numpy/__init__.py", line 130, in <module>
import add_newdocs
File "/usr/local/lib/python2.5/site-packages/numpy/add_newdocs.py", line 9, in <module>
from lib import add_newdoc
File "/usr/local/lib/python2.5/site-packages/numpy/lib/__init__.py", line 13, in <module>
from polynomial import *
File "/usr/local/lib/python2.5/site-packages/numpy/lib/polynomial.py", line 18, in <module>
from numpy.linalg import eigvals, lstsq
File "/usr/local/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 47, in <module>
from linalg import *
File "/usr/local/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 22, in <module>
from numpy.linalg import lapack_lite
ImportError: liblapack.so: cannot open shared object file: No such file or directory
A google search for the last line ("ImportError....") turned up a few things but it was all well over my head. I haven't a clue what this means (except that 'liblapack.so' appears to be missing) or what to do about it.
Thanks for the quick response! I tried this....and to make matters more complicated I don't have root access. Getting root access is, unfortunately, not really an option in my work environment. Is there a way to do with this without root?
Use with e.g.
export LD_LIBRARY_PATH=/home/<name>/usr/lib:/usr/lib:/lib && <other-command>
..
Ugh....I should emphasize that I'm **very* new to all this. I'm trying to figure out what this means, but a lot of it is unclear.
"unpack the rpm's": I found those files and downloaded them (the 64 bit versions). I'm not sure what 'unpack the rpm's' means. I found an 'rpm' command...is that what I should be using? I don't see a way to get it to install in /home/<name>/usr/lib/.
And then, the export command. I add that to my .bashrc file? What's <other-command> referring to?
I'm sorry if these are very basic questions...I've never tried to do anything like this before and I'm finding the available documentation incredibly obtuse.
The export command is temporary. Will reset to /usr/lib:/lib etc.
when you exit the terminal.
The LD_LIBRARY_PATH can be added to the bashrc. May work.
Or you can use a "start script", like :
Thanks again for the reply. That was helpful. That seemed to fix the error I describe above, but now I get this error when trying to import numpy:
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.5/site-packages/numpy/__init__.py", line 130, in <module>
import add_newdocs
File "/usr/local/lib/python2.5/site-packages/numpy/add_newdocs.py", line 9, in <module>
from lib import add_newdoc
File "/usr/local/lib/python2.5/site-packages/numpy/lib/__init__.py", line 13, in <module>
from polynomial import *
File "/usr/local/lib/python2.5/site-packages/numpy/lib/polynomial.py", line 18, in <module>
from numpy.linalg import eigvals, lstsq
File "/usr/local/lib/python2.5/site-packages/numpy/linalg/__init__.py", line 47, in <module>
from linalg import *
File "/usr/local/lib/python2.5/site-packages/numpy/linalg/linalg.py", line 22, in <module>
from numpy.linalg import lapack_lite
ImportError: libptf77blas.so: cannot open shared object file: No such file or directory
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Quote:
ImportError: libptf77blas.so: cannot open shared object file: No such file
Frustrating ? Use 3 seconds to find the package at http://rpm.pbone.net/
Search >>> Advanced Search , and tick CentOS5 Scientific 5, Redhat EL5.
( Search for "libptf77blas.so".)
Also : These yum commands can be used as unprivileged user :
yum search <package name> ( Or part of package name.)
And : yum provides */libptf77blas.so
→ → atlas-devel
Well, I downloaded those two files (atlas-devel-3.8.3-1.el5.x86_64.rpm and atlas-3.8.3-1.el5.x86_64.rpm) and used rpm2cpio just as I did with the previous two .rpm files. I'm getting the same error message when I try to import numpy. Does another path need to be set somewhere so python knows where to find libptf77blas.so?
Just curious, is this a known "feature" of Red Hat? I'm surprised that it would ship with an incomplete python installation.
Just curious, is this a known "feature" of Red Hat? I'm surprised that it would ship with an incomplete python installation.
it did not
those files will be in the RHN repo
the one that YOU CAN NOT USE without root access, and a paid for support license, to install software and receive updates .
Code:
su -
yum install lapack-devel
and about 30 sec. later it is installed
--- WARNING ----
(atlas-devel-3.8.3-1.el5.x86_64.rpm and atlas-3.8.3-1.el5.x86_64.rpm)
those are for RHEL 5 and NOT for RHL6.1 . those rpms will KILL a rhel6 install
those files will be in the RHN repo
the one that YOU CAN NOT USE without root access, and a paid for support license, to install software and receive updates .
Well, I don't have root access.....but it looks like this is all moot anyway. Apparently the files in /usr/local/ are all for Red Hat 5.1 and my machine is the first to have 6.1 installed. Or something to that effect, it's all a bit over my head. It needs to be dealt with on a sys admin level as far as I can tell so I'll just have to wait. Thank you, everyone, for your willingness to help.
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511
Rep:
Quote:
I'm getting the same error message when I try to import numpy.
Does another path need to be set somewhere so python knows where
to find libptf77blas.so?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.