Public bug reported:
Hi,
I have installed a fresh version of Ubuntu 18.04 LTS (bionic) and I have
installed pyraf ($ sudo apt-get install python-pyraf). In particular, I have
installed the following version of the package:
$ apt-cache policy python-pyraf
python-pyraf:
Installed: 2.1.14+dfsg-6
Candidate: 2.1.14+dfsg-6
Version table:
*** 2.1.14+dfsg-6 500
500 http://gb.archive.ubuntu.com/ubuntu bionic/universe amd64 Packages
100 /var/lib/dpkg/status
After the installation, I have started IRAF and logged out in order to create
the folder ~/.iraf using the following command:
$ irafcl
ecl> logout
Nevertheless, when I try to import an IRAF task from a Python session, I get
the following error:
~$ python
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyraf.iraf import splot
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name splot
>>>
This error disappears if I copy an adapted version of a login.cl file
(see attached file and the note at the end of this text) inside the
folder ~/.iraf. This login.cl has been create in other computer using
the mkiraf command, which is NOT available in the current version iraf
in Ubuntu bionic.
Summarizing, it seems that mkiraf command is not longer needed by iraf
package. Nevertheless, mkiraf command seems to be needed by pyraf, as it
needs to access a ~/iraf/login.cl for importing the tasks.
Thank you very much for your help!
Cipse
NOTE: Adapted version means setting lines 7 and 10 of the file in order to
match right username. These lines are:
set home = "/home/USER/.iraf/"
set userid = "USER"
** Affects: pyraf (Ubuntu)
Importance: Undecided
Status: New
** Attachment added: "login.cl"
https://bugs.launchpad.net/bugs/1768907/+attachment/5133090/+files/login.cl
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1768907
Title:
Error when trying to import an IRAF task in Python
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pyraf/+bug/1768907/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs