Getting OS error message after installing Pyraf in Manjaro

Hello, community! I have been running Manjaro since 2017 and I pretty much know how to install software either from pamac or the terminal. However, sometimes things go wrong, in a way I cannot resolve by myself.

I installed Pyraf through PyPI. The recommended action was to run “pip install pyraf”. However, because I know that every now and then Python2 and Python3 commands get messy, I ran “pip3 install pyraf”. The recommendation from the terminal was to create a virtual environment to install pyraf, either manually or through pipx - so I ran “pipx install pyraf”. It seems to have been installed, though I get the following error message when I try to open it through the CL:
"OSError:
Your “iraf” environment variable is not defined and could not be
determined from /usr/local/bin/cl. This is are needed to find IRAF
tasks. Before starting pyraf, define ot by doing (for example):

export iraf=/iraf/iraf/

at the Unix command line. Actual values will depend on your IRAF installation,
and they are set during the IRAF user installation.
Also be sure to run the “mkiraf” command to create a logion.cl"

I do not know what to do exactly with this message. Could you provide some insights on what is happening indeed and how I should proceed?

Thank you in advance!

Just FYI:

Warning

Please be aware the IRAF is 40 years old legacy code and institutional support for IRAF and its usage is going away quickly. It is recommended to search alternative solutions, for example in the Astropy community, and not to start new projects using IRAF. See this article in the STScI newsletter for rationale and recommendations.

https://iraf-community.github.io/

I know, thank you for the warning. I was asked to install specifically Pyraf, but if I get it right, it is based on the IRAF framework. Two notes: first, IRAF appears installed on the application launcher (but not Pyraf), but it doesn’t run. Second, through the terminal it seems that Pyraf is indeed installed, but I get the OSError message I mentioned above.

You were asked by whom? :thinking:

Why do you need PyRAF at all? Context, please.

You are right about the context, I thought it didn’t matter for now.

So, I will attend a summer school on observational astrophysics, and we were asked from the organizing committee to install (among others) PyRAF and SAOImageDS9. These are the programs that will be used throughout the summer school.

(Apparently, the instructors use these programs themselves in their research - or this is the most plausible reason to me for this selection of programs.)