Im trying to install shoutpy on opensolaris 2009.6. It relies on boost.python. i've installed the boost_devel libraries from blastwave and linked /opt/csw/include/boost to /usr/include/boost . But when I try to easy_install shoutpy I get the following output
munderwo#opensolaris-test1:/usr/include$ pfexec easy_install shoutpy
Searching for shoutpy
Reading http://pypi.python.org/simple/shoutpy/
Reading http://dingoskidneys.com/shoutpy/
Best match: shoutpy 1.0.0
Downloading http://dingoskidneys.com/shoutpy/shoutpy-1.0.0.tar.gz
Processing shoutpy-1.0.0.tar.gz
Running shoutpy-1.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-w7XQfv/shoutpy-1.0.0/egg-dist-tmp-k11Dky
In file included from /usr/include/boost/python/object/make_instance.hpp:9,
from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
from /usr/include/boost/python/to_python_indirect.hpp:11,
from /usr/include/boost/python/converter/arg_to_python.hpp:10,
from /usr/include/boost/python/call.hpp:15,
from /usr/include/boost/python/object_core.hpp:12,
from /usr/include/boost/python/args.hpp:25,
from /usr/include/boost/python.hpp:11,
from shoutpy.cc:26:
/usr/include/boost/python/object/instance.hpp:44: error: a casts to a type other than an integral or enumeration type cannot appear in a constant-expression
/usr/include/boost/python/object/instance.hpp:44: error: '->' cannot appear in a constant-expression
/usr/include/boost/python/object/instance.hpp:44: error: `&' cannot appear in a constant-expression
In file included from /usr/include/boost/python/converter/registry.hpp:9,
from /usr/include/boost/python/converter/registered.hpp:8,
from /usr/include/boost/python/object/make_instance.hpp:10,
from /usr/include/boost/python/object/make_ptr_instance.hpp:8,
from /usr/include/boost/python/to_python_indirect.hpp:11,
from /usr/include/boost/python/converter/arg_to_python.hpp:10,
from /usr/include/boost/python/call.hpp:15,
from /usr/include/boost/python/object_core.hpp:12,
from /usr/include/boost/python/args.hpp:25,
from /usr/include/boost/python.hpp:11,
from shoutpy.cc:26:
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: '->' cannot appear in a constant-expression
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: `&' cannot appear in a constant-expression
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: template argument 1 is invalid
/usr/include/boost/python/converter/rvalue_from_python_data.hpp:99: error: `value' is not a member of `<declaration error>'
error: Setup script exited with error: command '/usr/lib/python2.6/pycc' failed with exit status 1
This is using python2.6, opensolaris 2009.06, boost 1.35.
any help would be great!
Cheers
Mark
Edit - this has been cross posted on serverfault as its a bit hard to classify where the problem domain is. https://serverfault.com/questions/88724/problem-with-opensolaris-boost-python-and-shoutpy
Unfortunately I've never tried to compile shoutpy under OpenSolaris and I don't use it these days. Boost.python requires a lot from its C++ compiler. Use easy_install -b build_directory shoutpy so it'll keep the source code after it fails, then check the C++ compiler Python tries to use against those supported by boost.python.
I tried compiling it on my desktop Linux and it still works after I edit setup.py to link against libboost_python-mt instead of libboost_python which doesn't exist in Ubuntu (there are several libboost_python* depending on Python version and so forth).
Related
I'm new to python and need help with getting hunspell installed on my windows 10. The tool is PyCharm.
First I tried to install CyHunspell: pip install CyHunspell and got the following error msg:
RuntimeError: 'pkg-config' is not recognized as an internal or external command,operable program or batch file.
Then I tried installing PyHunspell instead and got the following error msg:
ERROR: Could not find a version that satisfies the requirement PyHunspell (from versions: none)
ERROR: No matching distribution found for PyHunspell
Then I tried installing hunspell directly and got the following error msg:
hunspell.cpp
hunspell.cpp(20): fatal error C1083: Cannot open include file: 'hunspell.hxx': No such file or directory
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2
In my test code:
import hunspell
Result:
spellchecker = hunspell.HunSpell() failed with the following error msg:
AttributeError: module 'hunspell' has no attribute 'HunSpell'
I would think I'm not the first one who uses hunspell on windows 10, but somehow I can't seem to find info needed to get this to work.
The GNU Emacs documentation states here (underlined by me):
The EZWinPorts project provides many useful ports of recent versions of GNU and Unix software. This includes all the optional libraries used by Emacs (image libraries, libxml2, GnuTLS), RCS, Texinfo, a clone of man command, Grep, xz, bzip2, bsdtar, ID Utils, Findutils, Hunspell, Gawk, GNU Make, Groff, GDB.
You will indeed find Hunspell in the list of files of the EZWinPorts project on sourceforge.
Once unzipped, you shall find the executable hunspell.exe inside the bin folder. No installation required. The tool is to be used on the command-line. You probably should add it to your Windows Path.
Tested on my Windows 10 PC.
I have been trying to compile megahal for a few hours now and i dont seem to be getting anywhere. Has anyone had success with this?
http://megahal.alioth.debian.org/
I keep getting an error that says :
inlined from ‘load_personality.constprop’ at megahal.c:3283:8,
inlined from ‘change_personality.constprop’ at megahal.c:3332:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:293:2: warning: call to ‘__fread_chk_warn’ declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer
return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream);
^
cc1: some warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:44: recipe for target 'pythonmodule' failed
make: *** [pythonmodule] Error 1
I have installed python via sudo apt-get and i have been over every thread that talks about "'x86_64-linux-gnu-gcc' but I have found no solution
You are getting these errors just because you don't have the python development headers installed. You can install it using following command
sudo apt-get install python-dev ( for python 2.x )
sudo apt-get install python3-dev ( for python 3 )
you need the python developer module "python-dev".this will help you
error: command 'gcc' failed with exit status 1 while installing eventlet
after upgrading to vivid 15.04 on ubuntu i couldn't compile the module anymore so i tried something else. Since in the main folder there is a directory named Megahal with a Makefile in it, i tried to compile from there. First you need to go to that directory.
cd /home/user/Downloads/megahal-9.1.1/Megahal/
you need to go where you unzipped the archive and there you can read the README file and start compiling.
perl Makefile.PL
i copied the missing files i was able to find to that folder and from there
make
make test
but this didn't work for me and afther that
make install
i had to do
sudo make install
and that is all. unfortunately for me i have a problem with perl i think.
I keep getting this error from the module "PL_thr_key" after i load it to the eggdrop. The eggdrop works normally except for the module. No module, no AI and no fun :(
I'm having trouble while compiling certain python modules. The setup fails with the following error:
cc1: error: unrecognized command line option "-ip"
error: Setup script exited with error: command 'gcc' failed with exit status 1
I am on a shared system and do not have root access. So, I install the modules using:
easy_install --prefix=$HOME/local <module_dir>
I looked this up on google and SO but have found no concrete solution yet. From what I understand, it has to do something with the compiler settings/configuration.
I would really appreciate if you could guide me through the steps required to resolve this. I have encountered the same issue with several python modules(pygame, crypto, etc) while most others installed without any hiccups.
Thank You!
I recently started trying to switch to canopy from ipython notebooks, which I switched to from MATLAB. I am working towards getting a matlab-like experience for development and research.
I am doing most of these setups cross-platform, but I am starting on OS X.
I have been attempting to install packages for use in canopy, some of which require compilation such as SimpleITK and VTK6.0. I had these both successfully installed in my regular python2.7 installation, but I'm having some trouble installing them for canopy. Right now, Im working on recompiling SimpleITK/Superbuild with CMAKE to recreate the python wrappers. It asks for your python executable, include dir, and python lib location. I found the python executeable from sys.executable from within canopy, and the include dir with 'mdfind -name Python.h, which turned out to be the default location, I used the default python lib.
These were
executeable: /Users/jmerkow/Library/Enthought/Canopy_64bit/User/bin/python
Include: /System/Library/Frameworks/Python.framework/Headers
Lib: /usr/lib/libpython2.7.dylib
But I get the following error upon make:
AssertionError: Filename /Applications/Canopy.app/appdata/canopy-1.1.0.1371.macosx-x86_64/Canopy.app/Contents/lib/python2.7/os.py does not start with any of these prefixes: ['/Users/jmerkow/Library/Enthought/Canopy_64bit/User', '/Library/Python/2.7/site-packages', '/Users/jmerkow/Library/Enthought/Canopy_64bit/User/Extras/lib/python', '/Users/jmerkow/Library/Python/2.7/site-packages', '/Users/jmerkow/.local/lib/python/2.7/site-packages', '/Users/jmerkow/Library/Python/2.7/lib/python/site-packages']
ERROR
-- Installing numpy from /Users/jmerkow/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/numpy to /numpy
ERROR
/bin/sh: ../Testing/Installation/PythonVirtualenv/bin/python: No such file or directory
make[5]: *** [lib/_SimpleITK.so] Error 127
make[4]: *** [Wrapping/CMakeFiles/SimpleITK_PYTHON.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [SimpleITK-prefix/src/SimpleITK-stamp/SimpleITK-build] Error 2
make[1]: *** [CMakeFiles/SimpleITK.dir/all] Error 2
make: *** [all] Error 2
Also, anyother tips to help me get this done are very welcome
EDIT BELOW
So I attempted to compile using:
/System/Library/Frameworks/Python.framework/Versions/Current/bin/python
/System/Library/Frameworks/Python.framework/Versions/Current/include/python2.7/
/System/Library/Frameworks/Python.framework/Versions/Current/lib/libpython2.7.dylib
This compiled and created and egg file named
SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg
but I get the following error when I use enpkg
Traceback (most recent call last):
File "/Users/jmerkow/Library/Enthought/Canopy_64bit/User/bin/enpkg", line 10, in
sys.exit(main())
File "/Applications/Canopy.app/appdata/canopy-1.1.0.1371.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages/enstaller/main.py", line 702, in main
reqs.append(Req(name + ' ' + version))
File "/Applications/Canopy.app/appdata/canopy-1.1.0.1371.macosx-x86_64/Canopy.app/Contents/lib/python2.7/site-packages/enstaller/resolve.py", line 32, in init
raise Exception("Not a valid requirement: %r" % req_string)
Exception: Not a valid requirement: 'SimpleITK 0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg'
with easy_install I get this error:
Processing SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg
removing '/Users/jmerkow/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg' (and everything under it)
creating /Users/jmerkow/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg
Extracting SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg to /Users/jmerkow/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages
SimpleITK 0.7.0.dev88-ge297c is already the active version in easy-install.pth
Installed /Users/jmerkow/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/SimpleITK-0.7.0.dev88_ge297c-py2.7-macosx-10.8-intel.egg
Processing dependencies for SimpleITK==0.7.0.dev88-ge297c
Searching for SimpleITK==0.7.0.dev88-ge297c
Reading cant post
Reading cant post
Reading cant post
No local packages or download links found for SimpleITK==0.7.0.dev88-ge297c
error: Could not find suitable distribution for Requirement.parse('SimpleITK==0.7.0.dev88-ge297c')
It looked like I installed it, so I tried to import:
import SimpleITK
Fatal Python error: PyThreadState_Get: no current thread
Abort trap: 6
You have configure SimpleITK to use your system python executable, library and include files. However, you are trying to run with the Canopy distribution. They are not binary compatible and the mismatch caused that type of program termination.
You canopy python executable was correctly found:
/Users/jmerkow/Library/Enthought/Canopy_64bit/User/bin/python
But you need to make the PYTHON_INCLUDE_DIR and PYTHON_LIBRARY consistent. Try the following commands to help you determine the correct path:
find /Users/jmerkow/Library/Enthought/Canopy_64bit/ -name Python.h
find /Users/jmerkow/Library/Enthought/Canopy_64bit/ -name lib python*.dylib
I am trying to install "pretty damn quick", an analysis tool for Layered Queing networks.
However there seems to be a lot wrong with my system, and switching to Linux is not an option.
Here is what i tried to get the PDQ running:
First try: Python
I installed python2.7 and downloaded the PDQ for python distribution (its in the tarball in the python dir) :
C:\pdq\pdq42\python>python setup.py install
running install
running build
running build_ext
building 'pdq' extension
error: Unable to find vcvarsall.bat
This error stems from the fact that i supposedly dont have a C-compiler. Even though typing g++ gives me:
C:\pdq\pdq42\python>g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=c:/rtools/gcc-4.6.3/bin/../libexec/gcc/i686-w64-mingw3
3/lto-wrapper.exe
Target: i686-w64-mingw32
...snipped...
This problem is somehow documented? So i tried going over to Perl. It said there that the compiler comes with Strawberry Perl. So I installed that. Dmake gave me a lot of trouble but in the end I managed to install it.
C:\pdq\pdq42\perl5>perl Makefile.PL
Writing Makefile for pdq
C:\pdq\pdq42\perl5>dmake
Skip blib\lib\pdq.pm (unchanged)
...snipped...
g++.exe: error: MVA_Approx.o: No such file or directory
g++.exe: error: MVA_Canon.o: No such file or directory
g++.exe: error: MVA_Solve.o: No such file or directory
g++.exe: error: PDQ_Build.o: No such file or directory
g++.exe: error: PDQ_Exact.o: No such file or directory
g++.exe: error: PDQ_Globals.o: No such file or directory
g++.exe: error: PDQ_Report.o: No such file or directory
g++.exe: error: PDQ_Utils.o: No such file or directory
dmake: Error code 129, while making 'blib\arch\auto\pdq\pdq.dll'
Gives me new errors, that i cannot fix, since i cannot google them.
As the last resort i try out installing R, since this should work according to the documentation.
install.packages("c:\pdq\pdq_6.0-1.tar.gz",repos=NULL,type="source")
Warning: invalid package 'c:/pdq/pdq_6.0-1.tar.gz'
Error: ERROR: no packages specified
Warning messages:
1: running command '"C:/Programme/R/R-3.0.1/bin/i386/R" CMD INSTALL -l "C:\Programme\R\R-3.0.1\library" "c:/pdq/pdq_6.0-1.tar.gz"' had status 1
2: In install.packages("c:\pdq\pdq_6.0-1.tar.gz", repos = NULL, type = "source") :
installation of package ‘c:/pdq/pdq_6.0-1.tar.gz’ had non-zero exit status
However in this case i don't even know where to start debugging this to get it going.
So I am seeking help from SO. My question is:
Where did I go wrong and what can I do to find additional information leading to identify the problem? I would really like to have PDQ installed.