Hey I have looked at and old question here but it doesn't answer my question
I have installed libpng, then try to install autopy and get complie errors.
I am not great at python yet so I am not sure on how to fix them.
Ashley:~ ashleyhughes$ sudo easy_install autopy
Searching for autopy
Reading http://pypi.python.org/simple/autopy/
Reading http://www.autopy.org
Best match: autopy 0.51
Downloading http://pypi.python.org/packages/source/a/autopy/autopy-0.51.tar.gz#md5=b92055aa2a3712a9c3b4c874014b450e
Processing autopy-0.51.tar.gz
Running autopy-0.51/setup.py -q bdist_egg --dist-dir /tmp/easy_install-U9uWoj/autopy-0.51/egg-dist-tmp-hdjtIx
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
clang: warning: argument unused during compilation: '-mno-fused-madd'
src/screengrab.c:48:26: warning: implicit declaration of function
'CGDisplayBitsPerPixel' is invalid in C99
[-Wimplicit-function-declaration]
bitsPerPixel = (uint8_t)CGDisplayBitsPerPixel(displayID);
^
src/screengrab.c:191:2: warning: 'CGLSetFullScreen' is deprecated
[-Wdeprecated-declarations]
CGLSetFullScreen(glContext);
^
src/screengrab.c:194:2: warning: implicit declaration of function 'glReadBuffer'
is invalid in C99 [-Wimplicit-function-declaration]
glReadBuffer(GL_FRONT);
^
src/screengrab.c:194:15: error: use of undeclared identifier 'GL_FRONT'
glReadBuffer(GL_FRONT);
^
src/screengrab.c:197:2: warning: implicit declaration of function 'glFinish' is
invalid in C99 [-Wimplicit-function-declaration]
glFinish();
^
src/screengrab.c:199:6: warning: implicit declaration of function 'glGetError'
is invalid in C99 [-Wimplicit-function-declaration]
if (glGetError() != GL_NO_ERROR) return NULL;
^
src/screengrab.c:199:22: error: use of undeclared identifier 'GL_NO_ERROR'
if (glGetError() != GL_NO_ERROR) return NULL;
^
src/screengrab.c:207:2: warning: implicit declaration of function
'glPopClientAttrib' is invalid in C99 [-Wimplicit-function-declaration]
glPopClientAttrib(); /* Clear attributes previously set. */
^
src/screengrab.c:223:2: warning: implicit declaration of function
'glPushClientAttrib' is invalid in C99 [-Wimplicit-function-declaration]
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
^
src/screengrab.c:223:21: error: use of undeclared identifier
'GL_CLIENT_PIXEL_STORE_BIT'
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);
^
src/screengrab.c:225:2: warning: implicit declaration of function
'glPixelStorei' is invalid in C99 [-Wimplicit-function-declaration]
glPixelStorei(GL_PACK_ALIGNMENT, BYTE_ALIGN); /* Force alignment. */
^
src/screengrab.c:225:16: error: use of undeclared identifier 'GL_PACK_ALIGNMENT'
glPixelStorei(GL_PACK_ALIGNMENT, BYTE_ALIGN); /* Force alignment. */
^
src/screengrab.c:226:16: error: use of undeclared identifier
'GL_PACK_ROW_LENGTH'
glPixelStorei(GL_PACK_ROW_LENGTH, 0);
^
src/screengrab.c:227:16: error: use of undeclared identifier 'GL_PACK_SKIP_ROWS'
glPixelStorei(GL_PACK_SKIP_ROWS, 0);
^
src/screengrab.c:228:16: error: use of undeclared identifier
'GL_PACK_SKIP_PIXELS'
glPixelStorei(GL_PACK_SKIP_PIXELS, 0);
^
src/screengrab.c:235:2: warning: implicit declaration of function 'glReadPixels'
is invalid in C99 [-Wimplicit-function-declaration]
glReadPixels(x, y, width, height,
^
src/screengrab.c:236:30: error: use of undeclared identifier 'GL_BGRA'
MMRGB_IS_BGR ? GL_BGRA : GL_RGBA,
^
src/screengrab.c:236:40: error: use of undeclared identifier 'GL_RGBA'
MMRGB_IS_BGR ? GL_BGRA : GL_RGBA,
^
9 warnings and 9 errors generated.
error: Setup script exited with error: command 'clang' failed with exit status 1
Can anyone help. I need autopy as it works on multiple platforms
I used ethan.tira-thompson.com/Mac_OS_X_Ports.html to install libpng
Have xcode installed with command line tools as well
I had the same problem, if you notice all 9 errors are coming from one file:
src/screengrab.c
This file has not been updated to the latest version of OpenGL and there are deprecated methods. On the autopy github repo there is a bug reported for this here. The fix/hack suggested there is to add the line:
#include <OpenGL/gl.h>
after line 7 in src/screengrab.c. You are going to have to get the source from Github and alter it locally rather than using easy_install.
Note this is a hack that will get it to compile but the screen grabs will be all black. Someone needs to spend a few minutes rewriting screengrab.c with up to date methods.
When I added
#include <OpenGL/gl.h>
It did not compile.
So, I took a look though my hard disk, looking for each gl.h
So, I tried
#include "/System/Library/Frameworks/OpenGL.framework/Versions/A/Headers/gl.h"
Then I managed to compile it :-)
You could only install autopy in python 3.8; Else It can't be installed.
Or you can downgrade your autopy version. There is autopy release history:
https://pypi.org/project/autopy/#history
I had also errors while installing autopy, But when I installed python 3.8,
It worked perfectly.
That works - Thanks!
If you have tried this:
$ sudo easy_install autopy
Another option is to compile from the latest source on the GitHub repository:
$ git clone git://github.com/msanders/autopy.git
$ cd autopy
$ python setup.py build
$ python setup.py install
When building from source, make sure to cd out of the autopy directory before attempting to use AutoPy or else it may fail on an ImportError due to Python's relative imports.
Related
I am trying to use a new bioinformatics program written in C named 'Giggle'. They have included a python wrapper. Since I am on Windows 10 most of the bioinformatics stuff is only available for Linux, I am using the Linux subssystem with python 2 installed. The installation for the wrapper are as follows:
git clone --recursive https://github.com/brentp/python-giggle
cd python-giggle
python setup.py test
python setup.py install
When running the setup.py test I encountered all sorts of dependencies of which I had never heard like libbz2 and liblzma. Installation of these dependencies worked fine with sudo apt-get install but now upon running the test I get a long list of warnings like this one:
lib/htslib/hfile_libcurl.c:187:13: warning: function declaration isn’t a
prototype [-Wstrict-prototypes]
static void libcurl_exit()
These are all for different .h and .c files. The list ends with several errors:
lib/htslib/hfile_s3.c:70:2: error: #error No HMAC() routine found by configure
#error No HMAC() routine found by configure
^
lib/htslib/hfile_s3.c: In function ‘s3_rewrite’:
lib/htslib/hfile_s3.c:335:30: error: ‘DIGEST_BUFSIZ’ undeclared (first use in this function)
unsigned char digest[DIGEST_BUFSIZ];
^
lib/htslib/hfile_s3.c:335:30: note: each undeclared identifier is reported only once for each function it appears in
lib/htslib/hfile_s3.c:336:29: warning: implicit declaration of function ‘s3_sign’ [-Wimplicit-function-declaration]
size_t digest_len = s3_sign(digest, &secret, &message);
^
lib/htslib/hfile_s3.c:335:23: warning: unused variable ‘digest’ [-Wunused-variable]
unsigned char digest[DIGEST_BUFSIZ];
^
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I am kind of lost on this and googling the errors has not made me any wiser. I feel like it is a 'you are still using windows' kind of problem. Any help would be much appreciated.
I am trying to install GEOS for Django project and following Docs but while compiling on Ubuntu 16.04 Xenial I get this error. There was some fix for it here but it also didn't worked. Following is the error I get while I ran "make" as per official Django docs.
Error:
gdalserver.c: In function 'CreateSocketAndBindAndListen':
gdalserver.c:125:21: error: storage size of 'sHints' isn't known
struct addrinfo sHints;
^
gdalserver.c:127:31: error: invalid application of 'sizeof' to incomplete type 'struct addrinfo'
memset(&sHints, 0, sizeof(struct addrinfo));
^
gdalserver.c:130:23: error: 'AI_PASSIVE' undeclared (first use in this function)
sHints.ai_flags = AI_PASSIVE;
^
gdalserver.c:130:23: note: each undeclared identifier is reported only once for each function it appears in
gdalserver.c:133:12: warning: implicit declaration of function 'getaddrinfo' [-Wimplicit-function-declaration]
nRet = getaddrinfo(NULL, pszService, &sHints, &psResults);
^
gdalserver.c:136:48: warning: implicit declaration of function 'gai_strerror' [-Wimplicit-function-declaration]
fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(nRet));
^
gdalserver.c:136:25: warning: format '%s' expects argument of type 'char *', but argument 3 has type 'int' [-Wformat=]
fprintf(stderr, "getaddrinfo(): %s\n", gai_strerror(nRet));
^
gdalserver.c:142:39: error: dereferencing pointer to incomplete type 'struct addrinfo'
psResultsIter = psResultsIter->ai_next)
^
gdalserver.c:163:5: warning: implicit declaration of function 'freeaddrinfo' [-Wimplicit-function-declaration]
freeaddrinfo(psResults);
^
gdalserver.c:125:21: warning: unused variable 'sHints' [-Wunused-variable]
struct addrinfo sHints;
^
../GDALmake.opt:565: recipe for target 'gdalserver.lo' failed
make[1]: *** [gdalserver.lo] Error 1
make[1]: Leaving directory '/home/osboxes/gdal-1.11.2/apps'
GNUmakefile:69: recipe for target 'apps-target' failed
make: *** [apps-target] Error 2
Try version GDAL 2.2.2. The version you are trying is not maintained. Also try to upgrade all the version of software you are using. There is a reason for patches and upgrades so keep always updated versions.
I'm new to RedHat but have been using Ubuntu for a while. I'm trying to install rpy2 using pip install rpy2 and I get the error
/usr/include/features.h:164:1: warning: this is the location of the previous definition
./rpy/rinterface/_rinterface.c:86:31: error: readline/readline.h: No such file or directory
In file included from ./rpy/rinterface/_rinterface.c:122:
./rpy/rinterface/embeddedr.c: In function ‘SexpObject_CObject_destroy’:
./rpy/rinterface/embeddedr.c:68: warning: implicit declaration of function ‘PyCapsule_GetPointer’
./rpy/rinterface/embeddedr.c:69: warning: cast to pointer from integer of different size
./rpy/rinterface/embeddedr.c: In function ‘Rpy_PreserveObject’:
./rpy/rinterface/embeddedr.c:107: warning: implicit declaration of function ‘PyCapsule_New’
./rpy/rinterface/embeddedr.c:109: warning: assignment makes pointer from integer without a cast
./rpy/rinterface/embeddedr.c:122: warning: cast to pointer from integer of different size
./rpy/rinterface/embeddedr.c: In function ‘Rpy_ReleaseObject’:
./rpy/rinterface/embeddedr.c:178: warning: cast to pointer from integer of different size
./rpy/rinterface/embeddedr.c: In function ‘Rpy_ProtectedIDs’:
./rpy/rinterface/embeddedr.c:301: warning: cast to pointer from integer of different size
In file included from ./rpy/rinterface/_rinterface.c:125:
./rpy/rinterface/sexp.c: In function ‘Sexp_sexp_set’:
./rpy/rinterface/sexp.c:282: warning: implicit declaration of function ‘PyCapsule_CheckExact’
./rpy/rinterface/sexp.c:288: warning: cast to pointer from integer of different size
./rpy/rinterface/sexp.c: In function ‘Sexp_init’:
./rpy/rinterface/sexp.c:738: warning: unused variable ‘copy’
./rpy/rinterface/_rinterface.c: In function ‘EmbeddedR_init’:
./rpy/rinterface/_rinterface.c:1333: error: ‘rl_completer_word_break_characters’ undeclared (first use in this function)
./rpy/rinterface/_rinterface.c:1333: error: (Each undeclared identifier is reported only once
./rpy/rinterface/_rinterface.c:1333: error: for each function it appears in.)
./rpy/rinterface/_rinterface.c:1336: error: ‘rl_basic_word_break_characters’ undeclared (first use in this function)
./rpy/rinterface/_rinterface.c: In function ‘init_rinterface’:
./rpy/rinterface/_rinterface.c:3688: warning: assignment makes pointer from integer without a cast
error: command 'gcc' failed with exit status 1
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build-root/rpy2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-BynTYR-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build-root/rpy2
Storing complete log in /root/.pip/pip.log
I know that I need something called adns as mentioned elsewhere, but can't figure out how to install in on RedHat. I tried downloading it and installing from file but that didn't work.
You need to sudo yum install readline-devel to get the readline header files needed to build.
I am getting gcc failed error while installing ngch : https://github.com/seandavi/ngCGH
it gives same error while easy_install as well and I am using windows.
Running pysam-0.7.4\setup.py -q bdist_egg --dist-dir c:\users\sam\appdata\lo
cal\temp\easy_install-ilqggk\pysam-0.7.4\egg-dist-tmp-rolwff
In file included from pysam\csamtools.c:241:
samtools/razf.h:38:18: error: zlib.h: No such file or directory
In file included from pysam\csamtools.c:241:
samtools/razf.h:91: error: expected specifier-qualifier-list before 'z_stream'
pysam\csamtools.c: In function '__pyx_pf_9csamtools_7Samfile_10fetch':
pysam\csamtools.c:9814: warning: passing argument 7 of 'bam_fetch' from incompatible
pointer type
pysam\csamtools.c: In function '__pyx_pf_9csamtools_7Samfile_11mate':
pysam\csamtools.c:10254: warning: passing argument 7 of 'bam_fetch' from incompa
tible pointer type
pysam\csamtools.c: In function '__pyx_pf_9csamtools_7Samfile_12count':
pysam\csamtools.c:10730: warning: passing argument 7 of 'bam_fetch' from incompa
tible pointer type
pysam\csamtools.c: In function '__pyx_pf_9csamtools_7Samfile_13pileup':
pysam\csamtools.c:11148: warning: passing argument 7 of 'bam_fetch' from incompa
tible pointer type
pysam\csamtools.c: In function '__pyx_f_9csamtools___advance_snpcalls':
pysam\csamtools.c:17424: warning: implicit declaration of function 'bam_prob_rea
ln'
pysam\csamtools.c:17452: warning: implicit declaration of function 'bam_cap_mapQ
'
pysam\csamtools.c: In function '__pyx_pf_9csamtools_20IteratorColumnRegion_1__ne
xt__':
pysam\csamtools.c:18907: warning: passing argument 1 of '__pyx_f_9csamtools_make
PileupProxy' from incompatible pointer type
pysam\csamtools.c: In function '__pyx_pf_9csamtools_21IteratorColumnAllRefs_1__n
ext__':
pysam\csamtools.c:19134: warning: passing argument 1 of '__pyx_f_9csamtools_make
PileupProxy' from incompatible pointer type
pysam\csamtools.c: In function '__Pyx_InitGlobals':
pysam\csamtools.c:38587: warning: this decimal constant is unsigned only in ISO
C90
error: Setup script exited with error: command 'gcc' failed with exit status 1
can anyone let me know how can I get over this error?
It's most likely pysam that fails to compile due to missing zlib-dev. Try installing it before ie in Ubuntu I did:
sudo apt-get install zlib1g-dev
for fedora you can try:
yum install zlib-devel
I don't know about windows though...
I'm looking to start a Machine Learning project, and I attempted to install PyML (on Mac OS X 10.6.8). In doing so I received the following error while running python setup.py build.
PyML/containers/ext/SparseDataSet_wrap.cpp: At global scope:
PyML/containers/ext/SparseDataSet_wrap.cpp:17658: fatal error: error writing to -: Broken pipe
compilation terminated.
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for C/ObjC but not for C++
PyML/containers/ext/SparseDataSet_wrap.cpp: In static member function ‘static Type swig::traits_as<Type, swig::value_category>::as(PyObject*, bool) [with Type = float]’:
PyML/containers/ext/SparseDataSet_wrap.cpp:3341: warning: ‘v’ may be used uninitialized in this function
PyML/containers/ext/SparseDataSet_wrap.cpp: In static member function ‘static Type swig::traits_as<Type, swig::value_category>::as(PyObject*, bool) [with Type = int]’:
PyML/containers/ext/SparseDataSet_wrap.cpp:3341: warning: ‘v’ may be used uninitialized in this function
lipo: can't open input file: /var/folders/BB/BB-0UcDKHzKgl2HboGzXqU+++TI/-Tmp-//ccf93ouC.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1
I followed the following tutorial for the install process:
http://pyml.sourceforge.net/tutorial.html
Any suggestions on what might be causing it and how to fix it? Thanks.
I also had precisely the same problem using PyML on Ubuntu.
Installing the Python development package (python2.x-dev) resolved the issue. You need to install those Python development headers, installing XCode should also install the headers on Mac.
They are usually located in "/System/Library/Frameworks/Python.framework/Versions/2.6/"