I need to run pytest with pymqi under Cygwin in my Windows environment, the windows MQ lib are installed, and I was using some pip options to make the compiling processus finding the include and lib folder ... like :
pip install --global-option=build_ext --global-option="-I/cygdrive/c/Program Files/IBM/MQ/Tools/c/include" pymqi
but during link it is looking for the mqic_r dynamic lib, which is an MQ Lib variant under unixes versions, under windows there is no '_r' variants of the libs
creating build/lib.cygwin-3.3.6-x86_64-3.6
creating build/lib.cygwin-3.3.6-x86_64-3.6/pymqi
gcc -shared -Wl,--enable-auto-image-base build/temp.cygwin-3.3.6-x86_64-3.6/code/pymqi/pymqe.o -LC:\Program Files\IBM\MQ/lib64 -L/opt/mqm/lib64 -L/usr/lib/python3.6/config -L/usr/lib -lmqic_r -lpython3.6m -o build/lib.cygwin-3.3.6-x86_64-3.6/pymqi/pymqe.cpython-36m-x86_64-cygwin.dll
/usr/lib/gcc/x86_64-pc-cygwin/11/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lmqic_r: No such file or directory
Any clues ? maybe some way to change the pymqi compilation process ?
Best regards
Related
For installing dlib, I followed this tutorial : http://www.pyimagesearch.com/2017/03/27/how-to-install-dlib/.
I am on Mac OS X 10.12.5 and using Python 3.5.
I run
$ brew install cmake
$ brew install boost
$ brew install boost-python --with-python3
It works without any error.
But when I try to install dlib with pip install dlib. I have an error :
The C compiler
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc"
is not able to compile a simple test program.
error: cmake configuration failed
ld: can't map file, errno=22 file '/usr/local/opt/qt/lib' for architecture x86_64
For the full error, please see on this link (doesn't want to paste the full error) :
https://gist.github.com/alexattia/3e98685310d90b65031db640d3ea716a
After retracing the error, when I tried to make dlib manually, I have this :
Linking C executable cmTC_05e45
/usr/local/Cellar/cmake/3.8.2/bin/cmake -E cmake_link_script
CMakeFiles/cmTC_05e45.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-Wl,-search_paths_first -Wl,-headerpad_max_install_names
/usr/local/opt/qt/lib CMakeFiles/cmTC_05e45.dir/testCCompiler.c.o -o
cmTC_05e45
For the full trace expand : https://gist.github.com/alexattia/1e54ffb87c9eb4c811033f5cadd90331
I reinstalled XCode (from Apple Store) and CMake (3.8.2 from the downloaded page), I even installed Qt Creator to have a clean version of Qt, but I still have the same error.
I tried to install it with conda but after the installation, I still don't have the module in python.
Thank you very much for any help.
You commented:
Indeed, in my .bash_profile, I have export LDFLAGS="/usr/local/opt/qt/lib",
export CPPFLAGS="/usr/local/opt/qt/include", export PATH="/usr/local/opt/qt/bin:$PATH".
But even while commenting it, I still have the same error
Neither of your assignments to LDFLAGS or CPPFLAGS makes sense, and the
first one is the cause the linker failure that concerns you.
The value of the environment variable LDFLAGS, if set, is interpreted by your build system
as linkage options. Likewise The value of the environment variable
CPPFLAGS, if set, is interpreted as preprocessor options.
/usr/local/opt/qt/lib is not a linkage option and /usr/local/opt/qt/include
is not a preprocessor option. These are simply directory names. Any argument that
you pass to the linker (or preprocessor, or compiler) that is not an option is
interpeted by the tool as an input file. Thus you have led the linker to believe
that /usr/local/opt/qt/lib is an input file to your linkage.
ld: can't map file, errno=22 file '/usr/local/opt/qt/lib' for architecture x86_64
is what the linker says when it discovers that /usr/local/opt/qt/lib is not
a file at all.
Presumably, you wish to instruct the linker that /usr/local/opt/qt/lib is
a directory in which it should search for libraries required by your linkage.
The linkage option that expresses that intent is:
-L/usr/local/opt/qt/lib
Here are the GCC options for linking
Similarly you intend to instruct that preprocessor that /usr/local/opt/qt/include
is a directory in which it should search for header files. The preprocessor
option to express that is:
-I/usr/local/opt/qt/include
Here are the GCC options for preprocessing
It is abnormal and inadvisable to specify compilation or linkage options
in your bash login profile, as you are doing. Specify such options in the
build system's input files (makefile, cmakelists file or similar), or as arguments to
the build system's configuration. But if you insist on specifying them in
your bash login profile, then you should specify:
LDFLAGS=-L/usr/local/opt/qt/lib
CPPFLAGS=-I/usr/local/opt/qt/include
And once you have made these environment settings in your bash_profile they will
only take effect in new login shells.
I had a similar issue but found out it was due to boost.
Try this.
brew uninstall boost-python
brew uninstall boost
brew install boost-python --with-python3 --without-python
pip3 install dlib
Most of the cx_Oracle 5.2.1 version builds are for Windows and Linux. How do I install/get an install for a Solaris 11 Sparc?
I tried to install using the following: cx_Oracle-5.2.1.tar.gz from sourceforge.net
But resulted in the following error:
/tmp/cx_Oracle-5.2.1$ python setup.py build
running build
running build_ext
building 'cx_Oracle' extension
creating build
creating build/temp.solaris-2.11-sun4v.32bit-2.7-11g
cc -DNDEBUG -KPIC -DPIC -I/u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/demo -I/u01/app/oracle/product/11.2.0.4/dbhome_1/rdbms/public -I/usr/include/python2.7 -c cx_Oracle.c -o build/temp.solaris-2.11-sun4v.32bit-2.7-11g/cx_Oracle.o -DBUILD_VERSION=5.2.1
unable to execute 'cc': No such file or directory
error: command 'cc' failed with exit status 1
Please advise.
Oracle (nor Sun, for that matter) did not include a compiler in the Solaris OS installation image. The Solaris Studio compiler is available for download, and of course you can also go the GCC route (UNIX Packages web site offers installable packages of GCC and various libraries needed for dependences for a modest fee.)
The original post is quote old though, and the solution as of now is to simply install the cx_oracle package from the 11.3 or 11.4 IPS.
I do not know the exact reason for the error you are getting. It looks, however, like the "cc" compiler is not installed. You should be able to find that package and install it. Or you will need to adjust your configuration to use gcc instead. This link may help:
http://www.unix.com/solaris/114262-command-cc-failed-even-though-gcc-installed.html
I want to install the pyvlfeat package. It requires Boost.Python.
When I run the command
python.exe setup.py build
I receive the following message:
C:\Users\alex\Anaconda\Scripts\gcc.bat -DMS_WIN64 -mdll -O -Wall -IC:\Users\A
lexkow\AppData\Roaming\Python\Python27\site-packages\numpy\core\include -Ivlfeat
/ -IC:\Users\alex\Anaconda\include -IC:\Users\alex\Anaconda\PC -c vlfeat/m
ser/vl_erfill.cpp -o build\temp.win-amd64-2.7\Release\vlfeat\mser\vl_erfill.o -m
sse2 -O2 -fPIC -w
In file included from vlfeat/mser/vl_erfill.cpp:7:0:
vlfeat/mser/../py_vlfeat.h:18:28: fatal error: boost/python.hpp: No such file or
directory
Which tells me Boost.Python is not installed correctly on my computer, or that I don't launch the python install command correctly.
The package INSTALL instructions are :
Building the Module on a Unix System --
The C++ wrappers require Boost.Python to be installed:
$ sudo apt-get install boost-python1.35-dev
pyvlfeat uses distutils, so to build the library:
$ python setup.py build
As I am on Windows I can't sudo apt-get, so I downloaded boost 1.57.0 and extracted it into
C:\Program Files\boost\boost_1_57_0
It did not change the result. And now I don't know what I should do:
When I read the documentation
The section 3: "No-Install Quick Start" explains how to build an extension module called extending and test it by running a Python script called test_extending.py. I don't think that is what I want to achieve and it seems outdated because it talks about the bjam build driver.
The section 4: "Installing Boost.Python on your system" looks more interresting, but it says the information is in the Getting Started Guide, and it is not.
How to install Boost.Python on Windows 7 in order to install a python package ? ?
I am looking at the setup.py file. It looks like you can set BOOST_PATH at the top. You should set that to the correct path to the Boost you downloaded, I think.
I am running Enthought Python 2.7 as well as default Python 2.7, Xcode 4.5.1 in Mac OS 10.8.2. I am trying to develop a speech to text converter in Python. I use Enthought Python as it allows me to record in 16000Hz, 1 Channel using pyaudio, which is needed for pocketsphinx to work.
I am trying to setup pocketsphinx using brew install pocketsphinx.
I get the following errors
Even manual installation using make and using default python results in same errors
Using brew doctor, I get
How do I successfully install pocketsphinx?
Here is my config.log
Homebrew logs pocketsphinx, sphinxbase
According to the log you have outdated version of the libsndfile installed. You have a header sndfile.h, but not sndfile.pc pkg-config file:
configure:14532: checking for SNDFILE
configure:14540: $PKG_CONFIG --exists --print-errors "sndfile"
Package sndfile was not found in the pkg-config search path.
Perhaps you should add the directory containing `sndfile.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sndfile' found
configure:14543: $? = 1
configure:14558: $PKG_CONFIG --exists --print-errors "sndfile"
Package sndfile was not found in the pkg-config search path.
Perhaps you should add the directory containing `sndfile.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sndfile' found
configure:14561: $? = 1
No package 'sndfile' found
configure:14589: result: no
configure:14603: checking sndfile.h usability
configure:14603: gcc -std=gnu99 -c -g -O2 -Wall -
I/Library/Frameworks/Python.framework/Versions/7.3/include/python2.7 -
I/Library/Frameworks/Python.framework/Versions/7.3/include/python2.7 conftest.c >&5
configure:14603: $? = 0
configure:14603: result: yes
To solve this problem either remove the header to not confuse the configure or install newer sndfile with pkg-config support.
Actually that should be fixed in sphinxbase as well, a bug report would be welcome.
I am setting up Python and Django on os X 10.7 from a virgin install and Xcode 4.3.
I tried using the default install of Python:
/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/
I normally use a Python based package manager called easy_install.
Easy_install seems to not be able to find the compiler.
EDIT: When I tried to install MySQL-python I got this error:
$ sudo easy_install MySQL-python
Password:
Searching for MySQL-python
Reading http://pypi.python.org/simple/MySQL-python/
Reading http://sourceforge.net/projects/mysql-python/
Reading http://sourceforge.net/projects/mysql-python
Best match: MySQL-python 1.2.3
Downloading http://download.sourceforge.net/sourceforge/mysql-python/MySQL-python-1.2.3.tar.gz
Processing MySQL-python-1.2.3.tar.gz
Running MySQL-python-1.2.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-P9H9WX/MySQL-python-1.2.3/egg-dist-tmp-rRTfZL
warning: no files found matching 'MANIFEST'
warning: no files found matching 'ChangeLog'
warning: no files found matching 'GPL'
unable to execute llvm-gcc-4.2: No such file or directory
error: Setup script exited with error: command 'llvm-gcc-4.2' failed with exit status 1
error: Setup script exited with error: command 'llvm-gcc-4.2' failed with exit status 1
Apparently, the system attempts to use the same compiler used to compile the installed Python framework.
For some reason Apple didn't include llvm-gcc-4.2.
Xcode 4.1 used GCC, but with Xcode 4.3 that seems to have changed.
From what I can gather, Apple wants to use Clang as the compiler vs GCC.
So I added to .bash_profile:
cc=clang
I decided I would just recompile Python with clang but first, I needed to install readline.
Fail:
Wed Feb 22 16:04:59 ~/Downloads/readline-6.2
$ ./configure
checking build system type... i386-apple-darwin11.3.0
checking host system type... i386-apple-darwin11.3.0
Beginning configuration for readline-6.2 for i386-apple-darwin11.3.0
checking whether make sets $(MAKE)... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/Bryan/Downloads/readline-6.2':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
What the easiest way to install Django on Lion 10.7?
Did you install the command-line tools with Xcode 4.3? They are not installed by default. You can install them by going to the Downloads pane in Xcode 4.3's preferences.
Making it way too hard:
First, make sure you install Xcode (available for free in the Mac App Store). It includes all the build tools that might be necessary to compile certain Python packages.
To get easy_install just download setuptools and follow the instructions for installing on Mac OS X at that link.
Once that's done, you can easy_install virtualenv to get a nice segregated environment to work in.
For the MySQL issue you have to edit the site.cfgfile:
mysql_config = /usr/local/mysql/bin/mysql_config
And then:
$ python setup.py build
$ sudo python setup.py install
Try updating XCode and reinstall all global site-packages. You may also want to try pip instead of easy_install.
You can also try to compile with
export ARCHFLAGS='-arch i386 -arch x86_64'
This solved many of my problems in the past when upgrading OSX versions.