New problems with new install
Closed this issue · 10 comments
I installed the S4 again and the first run of sagui
returns:
[julio@bd2093ea ~]$ sagui
/usr/lib64/python2.7/site-packages/gtk-2.0/gtk/__init__.py:122: RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK
set_interactive(1)
ERROR: IOError: Calculated spectrum is not available. Check if syn(spec|plot) ran correctly. [s4.synthesis.synplotwrapper]
Traceback (most recent call last):
File "/usr/bin/sagui", line 513, in <module>
main()
File "/usr/bin/sagui", line 508, in main
mw = MainWindow()
File "/usr/bin/sagui", line 41, in __init__
self.wdg = Widget()
File "/usr/bin/sagui", line 139, in __init__
self.synplot()
File "/usr/bin/sagui", line 172, in synplot
self.syn.run()
File "/usr/lib/python2.7/site-packages/s4/synthesis/synplotwrapper.py", line 97, in run
'syn(spec|plot) ran correctly.')
IOError: Calculated spectrum is not available. Check if syn(spec|plot) ran correctly.
IDL and Intel Fortran are installed and working.
Are you running inside a virtualenv?
Are you sure that ifort
is working? When you installed S4
could you see that it compiled synspec
?
I think I had this problem. I lose one day and then decided to use virtualenv
.
Also, you can try the following: open an ipython
and type:
from s4.synthesis import Synplot
Synplot(20000, 4, wstart=4460, wend=4480).plot()
EDIT: Do not need to try this. The problem is not with sagui
. Is with the synplot
wrapper.
I tryed it. ifort
and idl
are running ok. I'm not running it in a virtualenv
.
I think the problem is that the folder .s4
in the home is not available.
Ok. Try the following:
python setup.py build
pip install . --upgrade > test
Then paste the contents of the test
file here.
Here:
ifort available.
Compiling Synspec49.
Compiling Rotin3
running build
running build_py
creating build
creating build/lib
creating build/lib/s4
copying s4/__init__.py -> build/lib/s4
creating build/lib/s4/spectools
copying s4/spectools/__init__.py -> build/lib/s4/spectools
copying s4/spectools/gen_tools.py -> build/lib/s4/spectools
creating build/lib/s4/plottools
copying s4/plottools/analysis_plot.py -> build/lib/s4/plottools
copying s4/plottools/__init__.py -> build/lib/s4/plottools
copying s4/plottools/windows.py -> build/lib/s4/plottools
creating build/lib/s4/synthesis
copying s4/synthesis/__init__.py -> build/lib/s4/synthesis
copying s4/synthesis/synplotwrapper.py -> build/lib/s4/synthesis
creating build/lib/s4/utils
copying s4/utils/handling.py -> build/lib/s4/utils
copying s4/utils/__init__.py -> build/lib/s4/utils
creating build/lib/s4/io
copying s4/io/wrappers.py -> build/lib/s4/io
copying s4/io/__init__.py -> build/lib/s4/io
copying s4/io/specio.py -> build/lib/s4/io
running build_scripts
creating build/scripts-2.7
copying and adjusting s4/GUI/sagui -> build/scripts-2.7
copying and adjusting scripts/sensi_line -> build/scripts-2.7
changing mode of build/scripts-2.7/sagui from 664 to 775
changing mode of build/scripts-2.7/sensi_line from 664 to 775
Unpacking /home/julio/S4
Running setup.py egg_info for package from file:///home/julio/S4
s4/synthesis/synplot/synspec49.f(16669): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
602 format(14x,4(i4,1x,e9.3))
--------------------------^
s4/synthesis/synplot/synspec49.f(16668): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
601 format(3i4,2x,4(i4,1x,e9.3))
-----------------------------^
s4/synthesis/synplot/synspec49.f(17809): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
511 FORMAT (A8,E11.5,4E12.5,I1,(I2,I3),3(I2,I2))
--------------------^
ifort available.
Compiling Synspec49.
Compiling Rotin3
Installing collected packages: S4
Found existing installation: S4 0.0.0
Uninstalling S4:
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/pip/basecommand.py", line 139, in main
status = self.run(options, args)
File "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 271, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/usr/lib/python2.7/site-packages/pip/req.py", line 1181, in install
requirement.uninstall(auto_confirm=True)
File "/usr/lib/python2.7/site-packages/pip/req.py", line 495, in uninstall
paths_to_remove.remove(auto_confirm)
File "/usr/lib/python2.7/site-packages/pip/req.py", line 1518, in remove
renames(path, new_path)
File "/usr/lib/python2.7/site-packages/pip/util.py", line 293, in renames
shutil.move(old, new)
File "/usr/lib64/python2.7/shutil.py", line 302, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/bin/sagui'
Storing complete log in /home/julio/.pip/pip.log
Sorry, I forgot the sudo
!
sudo pip install . --upgrade > test
So @juliotux got the following problem:
sudo pip install .
Unpacking /home/julio/S4
Running setup.py egg_info for package from file:///home/julio/S4
g77 and ifort are not available. Synspec and Rotin will not be compiled.
Cleaning up...
[julio@bd2093ea S4]$ sudo ifort
sudo: ifort: command not found
[julio@bd2093ea S4]$ ifort
ifort: command line error: no files specified; for help type "ifort -help"
This means the ifort
was not "sourced".
I recommend that you put the following text in your ~/.bashrc
# Intel Fortran Compiler
MACHINE_TYPE=`uname -m`
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
# 64-bit stuff here
source /opt/intel/composer_xe_2011_sp1.9.293/bin/compilervars.sh intel64
else
# 32-bit stuff here
source /opt/intel/composer_xe_2011_sp1.9.293/bin/compilervars.sh ia32
fi
Now, every time you open a terminal, it will source ifort
for you.
@juliotux try installing from this new branch. If it works for you I will do a PR.
To install do the following:
git fetch origin
git checkout -b installation origin/installation
sudo pip uninstall s4
git clean -fXd
python setup.py build
sudo pip install .
Synspec
will be compile only when you call python setup.py build
. We are uninstalling it and cleaning the repository just to be safe.
Solved automagically.