I need to install megam for nltk classification routines in Python.
I followed the instruction by Milk Magic from this post:
0. Downloaded megam source from http://www.umiacs.umd.edu/~hal/megam/index.html
1. Installed cygwin with gcc, make and ocaml packages
2. changed the makefile
3. when trying to compile megam with a makefile I receive an error with the following content
make
ocamldep *.mli *.ml > .depend
ocamlc -g -custom -o megam str.cma -cclib -lcamlstr bigarray.cma -cclib -lbigarray unix.cma -cclib -lunix -I /lib/ocaml/caml fastdot_c.c fastdot.cmo intHashtbl.cmo arry.cmo util.cmo data.cmo bitvec.cmo cg.cmo wsemlm.cmo bfgs.cmo pa.cmo perceptron.cmo radapt.cmo kernelmap.cmo abffs.cmo main.cmo
sh: flexlink: command not found
File "fastdot_c.c", line 1:
Error: Error while building custom runtime system
make: *** [Makefile:101: megam] Error 2
Do you know what the problem might be?
Maybe somebody has solved the same problem recently and could help.
As the error is
sh: flexlink: command not found
you need to find the package that contains it
$ cygcheck -p flexlink
Found 5 matches for flexlink
flexdll-0.34-1 - flexdll: Creates DLLs with runtime symbol resolution (installed binaries and support files)
flexdll-0.35-1 - flexdll: Creates DLLs with runtime symbol resolution (installed binaries and support files)
flexdll-0.35-2 - flexdll: Creates DLLs with runtime symbol resolution
...
So you need to install the flexdll package.
$ cygcheck -l flexdll |grep bin
/usr/bin/flexlink
Related
I'm installing opencv for Python in Ubuntu 18.04 LTS from the official OpenCV release here https://docs.opencv.org/4.1.0/d2/de6/tutorial_py_setup_in_ubuntu.html
after creating the build directory and entering cmake ../ the moment I enter the command to make it's giving me the following error -
Previously I've used OpenCV on Windows. I'm new in Ubuntu. Please help.
In file included from /home/avi/opencv/modules/core/test/test_precomp.hpp:12:0,
from /home/avi/opencv/build/modules/core/opencv_test_core_pch_dephelp.cxx:1:
/home/avi/opencv/modules/core/include/opencv2/core/private.hpp:66:12: fatal error: Eigen/Core: No such file or directory
# include <Eigen/Core>
^~~~~~~~~~~~
compilation terminated.
modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/build.make:62: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.o' failed
make[2]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/opencv_test_core_pch_dephelp.cxx.o] Error 1
CMakeFiles/Makefile2:1287: recipe for target 'modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/opencv_test_core_pch_dephelp.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
Go to /home/avi/opencv/modules/core/include/opencv2/core/private.hpp file.
Edit the line: # include <Eigen/Core> to # include <eigen3/Eigen/Core>
Read more about this error from here.
Seems like OpenCV did not find Eigen where it was expecting.
Supposing you installed Eigen:
sudo apt-get install libeigen3-dev
The most correct way would be for you to specify to OpenCV where you installed Eigen by setting the variable EIGEN_INCLUDE_PATH, usually to \usr\include, but check your system.
Another option, instead of editing the OpenCV code, is to create some links between where you installed Eigen, and where OpenCV expects it to be:
cd /usr/include
sudo ln -sf eigen3/Eigen Eigen
sudo ln -sf eigen3/unsupported unsupported
I didn't find the solution for me in this post so I may as well share it if somebody comes by.
Problem : The include was looking for an include called Eigen while I installed Eigen3.
Solution : Create a soft link to create a directory called Eigen that redirect to Eigen3.
sudo ln -s /usr/include/eigen3/Eigen /usr/include/Eigen
https://www.programmersought.com/article/44372970691/
I am trying to install boost.numpy in y Ubuntu 16.04. I tried these commnads to install boost.numpy
**git clone https://github.com/ndarray/Boost.NumPy.git
cd Boost.NumPy && mkdir build && cd build
cmake -DPYTHON_LIBRARY=$HOME/anaconda3/lib/libpython3.5m.so ../**
After doing cmake i am facing this error:
Detected architecture 'x86_64'
-- Using Python3
CMake Error at /usr/share/cmake-3.5/Modules/FindBoost.cmake:1677 (message):
Unable to find the requested Boost libraries.
Boost version: 1.59.0
Boost include path: /home/sumit/Documents/Software/boost_1_59_0
Could not find the following static Boost libraries:
boost_python3
No Boost libraries were found. You may need to set BOOST_LIBRARYDIR to the
directory containing Boost libraries or BOOST_ROOT to the location of
Boost.
Call Stack (most recent call first):
CMakeLists.txt:48 (find_package)
Boost Paths:
Include : /home/sumit/Documents/Software/boost_1_59_0
**Libraries**: /home/sumit/Documents/Software/boost_1_59_0/libs
Configuring incomplete, errors occurred!
See also "/home/sumit/Documents/Software/Boost.NumPy/build/CMakeFiles/CMakeOutput.log".
Previously it was not able to find the boost libraries sp i manualy changed the CmakeList.txt library path with the path of boost_1_59_0 lib path. This path comes up in library option when i do cmake. But still boost_python3 is missing. I am new into this what i tried is just the result of google.
Please help.
On Ubuntu the library names for boost are:
libboost_python, libboost_python-py35, or libboost_python-py27
This means that in cmake you'll need to refer to them as python-py35 instead of python3. Alternatively, if you don't control the CMakeLists.txt you can create a symlink:
/usr/lib/x86_64-linux-gnu/libboost_python-py35.so -> /usr/lib/x86_64-linux-gnu/libboost_python3.so
In my CMakeLists.txt file I have the following:
if(UNIX)
set( BOOST_PYTHONLIB python-py35)
else()
set( BOOST_PYTHONLIB python3)
endif()
find_package (Boost 1.58 REQUIRED COMPONENTS
coroutine
context
filesystem
program_options
system
thread
${BOOST_PYTHONLIB}
chrono
)
Simple answer for this is that wherever boost_python3 is specified,
you replace it with boost_python-py35.
I tried this when I was setting up caffe for python 3.5 . In the Makefile.config file, I only made the above changes and it worked fine for me.
On one of my Windows 7 development machines, I am attempting to install the Python Image Library.
My machines are similar. Both run Windows 7 Professional, x64. Both use Python 2.7.3 (32bit). On one of the machine pip install PIL works fine. On the other it fails with the trace ending with this:
build\temp.win-amd64-2.7\Release\_imaging.pyd.manifest : general error c1010070:
Failed to load and parse the manifest. The system cannot find the file specified.
error: command 'mt.exe' failed with exit status 31
How can I resolve this error?
Thanks to http://bugs.python.org/issue4431, this error was fixed by modifying:
C:\<Python dir>\Lib\distutils\msvc9compiler.py
and adding:
ld_args.append('/MANIFEST')
after the MANIFESTFILE line so it looks like:
# Embedded manifests are recommended - see MSDN article titled
# "How to: Embed a Manifest Inside a C/C++ Application"
# (currently at http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx)
# Ask the linker to generate the manifest in the temp dir, so
# we can embed it later.
temp_manifest = os.path.join(
build_temp,
os.path.basename(output_filename) + ".manifest")
ld_args.append('/MANIFESTFILE:' + temp_manifest)
ld_args.append('/MANIFEST')
If you still get the error, then change the if arg.startswith("/MANIFESTFILE:") to if arg.startswith("/MANIFEST:") in the manifest_get_embed_info(self, target_desc, ld_args) method.
Download the compressed package from pypi, and try building and installing in your machine. This link could give you some hints. That exactly deals with your problem only but the installation varies.
If you've reached here looking for
general error c1010070:
Failed to load and parse the manifest. The system cannot find the file specified.
error: command 'mt.exe' failed with exit status 31
Here's a workaround that worked in Windows 8/x64/Python 3.3/VS 11:
# py 3.3 seems to be compiled against VS 2010 compiler, force using VS11 cl.exe for us
$env:VS100COMNTOOLS=$env:VS110COMNTOOLS
# Modify C:\Python33\lib\distutils\msvc9compiler.py
# Comment line 670: ld_args.append('/MANIFESTFILE:' + temp_manifest)
# Basically it will instruct build to not look for manifest file
When I want to install the package wxPython-2.8.7.1.spkg from here
in the terminal of Sage it gives me a syntax error. What i write in Sage terminal and the result are as follow:
sage: sage -i wxPython-2.8.7.1.spkg
------------------------------------------------------------
File "<ipython console>", line 1
sage -i wxPython-RealNumber('2.8').gen(7).1.spkg
^
SyntaxError: invalid syntax
I also use the direct address of the package but the result was the same:
sage: sage -i http://www.sagemath.org/packages/experimental/wxPython-2.8.7.1.s>
------------------------------------------------------------
File "<ipython console>", line 1
sage -i http://www.sagemath.org/packages/experimental/wxPython-RealNumber('2.8').gen(7).1.spkg
^
SyntaxError: invalid syntax
I also downloaded the package and used the local address but the result was the same.
You need to do this from the command line before starting Sage. Otherwise you can use
sage: install_package("wxPython")
which is currently downloading for me... and then failed:
checking for GTK+ - version >= 2.0.0... no
*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that gtk+-2.0.pc is
installed. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.
Error configure wx widgets.
real 0m13.972s
user 0m2.791s
sys 0m5.232s
************************************************************************
Error installing package wxPython-2.8.7.1
************************************************************************
Along those lines, here is what it says at the list of experimental spkgs, of which this is one:
These are EXPERIMENTAL! They probably won't work at all for you! Use at your own risk! Many of these have never been successfully built on any platform!
So buyer beware!
I'm trying to install libjpeg on os X to fix a problem with the Python Imaging Library JPEG setup.
I downloaded libjpeg from http://www.ijg.org/files/jpegsrc.v7.tar.gz
I then began to setup the config file
cp /usr/share/libtool/config.sub .
cp /usr/share/libtool/config.guess .
./configure –enable-shared
However, the enable-shared flag didn't seem to work.
$ ./configure –-enable-shared
configure: WARNING: you should use --build, --host, --target
configure: WARNING: invalid host type: –-enable-shared
checking build system type... Invalid configuration `–-enable-shared': machine `–-enable' not recognized
configure: error: /bin/sh ./config.sub –-enable-shared failed
I've done lot's of google searches and I can't figure out where the error is or how to work around this error.
I had copied the code from a blog.
The flag character there was not a hyphem , it just looked like one:
ord("–")
TypeError: ord() expected a character, but string of length 3 found
I changed it to a proper hypen and it works fine.