I am updating an old linux (RHEL 2.6.9) scons (v0.96) to the current v2.3
Frankly scons has been working quite well - just trying to get rid of some scons warnings that have resulted from changes to my Scons files as I've upgraded other platforms to v2.3
First of all, the download scons-2.3.0-1.noarch.rpm resulted in a "Package Not Found" (python) alert. Python is certainly present (albeit old as well - v2.3.4)
I then downloaded scons-2.3.0.zip - and (as root) executed 'python setup.py install'. That proceeded to completion without any errors. Me thinks.
But, alas, in a Terminal window, I type:
$scons -v
Traceback (most recent call last):
File "/usr/bin/scons", line 192, in ?
SCons.Script.main()
AttributeError: 'module' object has no attribute 'main'
Duh. Certainly my old reliable scons is broken :(
Comments? Suggestions?
-harry
BTW, I am not a python expert at all; have been able to support this scons build simply by example and minimal changes - which is to the credit of this tool!
Indeed python 2.3 was too old (v2.4 is the minimum for scone v2.3).
I installed python 2.7.6 (see On linux SUSE or RedHat, how do I load Python 2.7)
And, after updating $PATH appropriately (see above) and linking /usr/local/bin/python to /usr/local/bin/python2.7, scons was one again working!
Related
I'm trying to set up a conda environment with python 3.6 on a remote server working on CentOS. The installation goes well, but once I try to execute python I get the following message python: /lib64/libc.so.6: version 'GLIBC_2.15' not found. I noticed that for other python version older than 3.4 this doesn't happen.
Given this, I tried installing glibc before python, but after installing python 3.6 and trying to run it, now I get Segmentation fault (core dumped).
Note that I don't have permissions to update conda and that the version the server is using is 4.4.7, so I haven't tried updating it. However, I had previously set an environment without any problem. After I tried to install a package my jupyter notebooks wouldn't work so I removed the environment.
What would be the new system and the old one.
The old system -- the remove server running CentOS, has GLIBC that is older than 2.15.
The new system -- the one on which your Python 3.6 was compiled, used GLIBC-2.15 (or newer).
You need to either find a Python 3.6 build which is targeted to your version of CentOS, or you need to compile one yourself on a system with GLIBC matching whatever is installed on your remote server.
P.S. Saying "server running CentOS" is like saying "system running Windows" (i.e. not saying much). Which version of CentOS?
I was trying to install FlatPak through apt-get, then I realised that it is not in the packages database, so as suggested in their website (http://flatpak.org/getting/) I added the repository:
sudo add-apt-repository ppa:alexlarsson/flatpak
however, the command generated an error and I don't know what to do next:
Traceback (most recent call last):
File "/usr/lib/linuxmint/mintSources/mintSources.py", line 1258, in <module>
codename = config_parser.get("general", "base_codename")
File "/usr/lib/python2.7/ConfigParser.py", line 330, in get
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'general'
The purpose of this was to upgrade MonoDevelop, because I've version 5.1, and now version 6.1 is available, but it seems that new versions won't be available through the repo anymore. This is the reason I was trying to download from their website, but it uses a FlatPak package
I would appreciate any suggestion or tip of the next step to follow.
Thank you very much.
To upgrade MonoDevelop from 5.1, I to had problems with FlatPak.
My problem was that FlatPak is not compatible with the linux I was using at the time, Ubuntu 14.04.
For the MonoDevelop upgrade I end up forgetting about FlatPak, downloaded the MonoDevelop source and compiled it myself.
http://www.monodevelop.com/developers/building-monodevelop/
I am now running MonoDevelop 7.2
In order to run an optimization problem we set up Gurobi 6.0.4 together with
Anaconda (Version 2.2.0) Python (Python 2.7.9.) on
Linux CentOS release 6.6 (Final) with the 2.6.32-504.16.2.el6.x86_64 Kernel
Following the installation guidelines of Gurobi (listed here: http://www.gurobi.com/documentation/6.0/quickstart_linux.pdf)
everything worked out in the first step. Gurobi was installed, could obtain a license. Also the PATH variables have been set (in the .bashrc) according to the manual, with a little extension for the referal to anaconda python (and not the other local Versions of python (being 2.7 and 3.4):
export GUROBI_HOME="/opt/gurobi604/linux64"
export PATH="${PATH}:${GUROBI_HOME}/bin:${PATH}:opt/anaconda/bin"
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${GUROBI_HOME}/lib"
Following the procedure we executed: python2.7 setup.py install in the respective directory /opt/gurobi604/linux64. After this usually you could run the import gurobipy command in the python interpreter wihtout errors. For older Versions of Gurobi (as 5.6.3) this works out very well.
For 6.0.4 though we constantly receive the error:
ImportError: /opt/anaconda/lib/python2.7/site-packages/gurobipy/gurobipy.so: undefined symbol: _Py_FalseStruct
This is very reproducible, no matter if we put anaconda also in the global path, and check the bash for any overwriting of the environment variables, which is not the case.
On Windows 8 the Gurobi 6.0.4 and Anaconda Python 2.2.0 work together without any problems.
Also applying hints from here: Python Module Error on Linux did not work out.
Did anyone else experience these problems with this tooling combination? thx.
The error message indicates that you use the Python module for version 3.4 in your Python 2.7 package directory. This can happen if you do not clean your Python module build directory between builds. Please try the following:
Completely remove the 2.7 package from your Python 2.7 installation (e.g. remove /opt/anaconda/lib/python2.7/site-packages/gurobipy)
Completely remove the Python module build directory from your Gurobi installation (e.g. /opt/gurobi604/linux64/build)
Re-run the build process for the Python 2.7 module (e.g. run "python2 setup.py install" in /opt/gurobi604/linux64)
Please note that CentOS is currently a non-supported platform for Gurobi.
Thank you for the hint, I think we tried that, but did not finish the procedure in this way. We tried to clean the system but in that particular case still hat both python Versions (due to other applications that use 3.4) on the machine. Our solution in this case was just to reinstall everything clean on a Ubuntu 14.04 VM. Since then no further problems occured. (I know not the cleanest solution.)
We had some similar issues when we updated to Gurobi 6.5, but that could be solved when corrctly addressing the usual path issues.
Thank you in any case for the reply, I think this really will help us with the next, then clean deployment :-)
I cannot install OpenCV 2.4.4 in Cent OS 6.3
I have gone here
http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.4/
Then did:
wget to the direct link available in there to any location in the server with Cent OS 6.3 installed.
After that I did tar xvz CentOS-2.4.4.tar.gz2
then I did cd OpenCV-2.4.4 and then I did cmake ., make, make install
all logged in as root.
Errors I saw from cmake were pythonlibs cannot be found, yet python 2.7.7 is installed and it seems python 2.6.6 is installed also bundled with Cent OS 6.3 as it shows from cmake that the parser for python is that yet it complains it can't find the pythonlibs.
Asides that I didn't see any other error after cmake.
So I went ahead and did make, waited then did make install
Now I go to the samples directory of OpenCV. cd OpenCV-2.4.4 cd samples cd c
And put the following command in ssh ./myfile.c
which among other things calls a file that comes with opencv, it appear to struggle into finding a file that cannot be found, or a command that can't be found from a broken / wrong install , misconfiguration in the above process / hours of googling to find the answer, etc:
./facedetect.c: line 5: CvHaarClassifierCascade: command not found
./facedetect.c: line 6: CvMemStorage: command not found
./facedetect.c: line 8: syntax error near unexpected token `('
./facedetect.c: line 8: `void detectfaces(IplImage *frame)'
CvHaarClassifierCascade
not found
CvMemStorage
not found
what a problem, my OpenCV isn't working on Cent OS 6.3, I can't get it installed.
Also, I am pretty blind on this installation as there is not a single tutorial that I can find to install OpenCV in Cent OS yet there are many tutorials for Ubuntu, else I wouldn't post to stack.
this is the actual error from cmake, with similar output:
could not find png
could not find
tiff
could not find
jpeg
could not find
jasper
couldn ot find pythonlibs
missing: PYTHON_LIBRARIES PYTHON_INCLUDE_PATH
no module named numpy.distutils
sorry I find the question might be "too localized" - just close it down . thanks
why struggle when there is readymade linux/centos rpm available for opencv? (with some gotchas but for most part it will be just fine)
I have installed a bunch of qt packages - qt, qt-devel, qt4, qt4-devel, sip but can't get latest PyQt4 to compile.
I've pointed the configure script at my qt4lib as such
python configure.py -q /usr/lib64/qt4/bin/qmake --verbose
but getting errors like
DBus v1 does not seem to be installed.
cfgtest_QtHelp.cpp:1:25: error: qhelpengine.h: No such file or directory
sip: /mnt/hgfs/rnp_repos/PyQt-x11-gpl-4.8.1/sip/QtCore/qabstractitemmodel.sip:156: syntax error
Error: Unable to create the C++ code.
EDIT: Found out that SIP v4.11.2 is required for PyQt 4.8 but still can't make without errors. At least python configure.py finishes now.
Any tips?
Grab the PyQt4 SRPM from Fedora and rebuild using mock. You may need to look a few versions back for one that will compile against the version of Qt 4 in CentOS.
I've just successfully compiled PyQt 4.8 on Centos 5.5. I went down the route of building Qt4 from source - using qt-everywhere-opensource-src-4.7.1.tar.gz from Nokia.
Had to obtain various *-devel packages before Qt's ./configure would complete - see http://doc.qt.nokia.com/4.7/requirements-x11.html (don't worry about the version numbers being slightly lower than required).
Also I used Python 2.6 from the EPEL 5 repository (python26-devel). Just remember when building PyQt to run python26 configure.py (and not the default Python). I don't know if this will improve your mileage in building PyQt but we're porting an application from Windows which was already using 2.6 so this route was necessary for me.
Not going to post my entire .bash_history here (much trial and error!) but if you're trying this and get stuck please ask a question.