Installing psyco for python on Snow Leopard - python

I'm having some trouble installing psyco on my Macbook pro running Snow Leopard with python 2.6.1.
I've been trying to force python to run in 32-bit mode using the command
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes
Further, I have tried the Macport py26-psyco, which seems to finish but the module cannot be found when compiling.
$ sudo python setup.py install
PROCESSOR = 'ivm'
running install
running build
running build_py
running build_ext
building 'psyco._psyco' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -arch x86_64 -pipe -DALL_STATIC=1 -Ic/ivm -I/System/Library/Frameworks/Python.framework/Versions/2.6/include/python2.6 -c c/psyco.c -o build/temp.macosx-10.6-universal-2.6/c/psyco.o
In file included from c/initialize.h:48,
from c/psyco.c:14:
c/psyfunc.c: In function ‘psycofunction_call’:
c/psyfunc.c:801: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
In file included from c/initialize.h:49,
from c/psyco.c:14:
c/stats.c: In function ‘psyco_stats_reset’:
c/stats.c:260: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
c/stats.c: In function ‘psyco_stats_dump’:
c/stats.c:298: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
c/stats.c: In function ‘psyco_stats_top’:
c/stats.c:326: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
In file included from c/initialize.h:75,
from c/psyco.c:14:
c/Objects/pstructmember.c: In function ‘PsycoMember_GetOne’:
c/Objects/pstructmember.c:16: warning: unused variable ‘w2’
c/psyco.c: At top level:
c/codegen.c:748: warning: ‘integer_lshift’ defined but not used
c/ivm/prolog/insns-igen.i:175: warning: ‘psyco_insn_assertdepth’ defined but not used
c/ivm/prolog/insns-igen.i:197: warning: ‘psyco_insn_dynamicfreq’ defined but not used
c/codegen.c:66: warning: ‘cc_from_vsource’ defined but not used
c/Objects/plongobject.c:20: warning: ‘PsycoLong_AsDouble’ defined but not used
c/Objects/plistobject.c:116: warning: ‘PsycoList_SingletonNew’ defined but not used
c/codegen.c: In function ‘psyco_generic_call’:
c/codegen.c:423: warning: ‘_arg’ may be used uninitialized in this function
/usr/libexec/gcc/powerpc-apple-darwin10/4.2.1/as: assembler (/usr/bin/../libexec/gcc/darwin/ppc/as or /usr/bin/../local/libexec/gcc/darwin/ppc/as) for architecture ppc not installed
Installed assemblers are:
/usr/bin/../libexec/gcc/darwin/x86_64/as for architecture x86_64
/usr/bin/../libexec/gcc/darwin/i386/as for architecture i386
In file included from c/initialize.h:48,
from c/psyco.c:14:
c/psyfunc.c: In function ‘psycofunction_call’:
c/psyfunc.c:801: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
In file included from c/initialize.h:49,
from c/psyco.c:14:
c/stats.c: In function ‘psyco_stats_reset’:
c/stats.c:260: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
c/stats.c: In function ‘psyco_stats_dump’:
c/stats.c:298: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
c/stats.c: In function ‘psyco_stats_top’:
c/stats.c:326: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
In file included from c/initialize.h:75,
from c/psyco.c:14:
c/Objects/pstructmember.c: In function ‘PsycoMember_GetOne’:
c/Objects/pstructmember.c:16: warning: unused variable ‘w2’
c/psyco.c: At top level:
c/codegen.c:748: warning: ‘integer_lshift’ defined but not used
c/ivm/prolog/insns-igen.i:175: warning: ‘psyco_insn_assertdepth’ defined but not used
c/ivm/prolog/insns-igen.i:197: warning: ‘psyco_insn_dynamicfreq’ defined but not used
c/codegen.c:66: warning: ‘cc_from_vsource’ defined but not used
c/Objects/plongobject.c:20: warning: ‘PsycoLong_AsDouble’ defined but not used
c/Objects/plistobject.c:116: warning: ‘PsycoList_SingletonNew’ defined but not used
c/codegen.c: In function ‘psyco_generic_call’:
c/codegen.c:423: warning: ‘_arg’ may be used uninitialized in this function
c/psyco.c: At top level:
c/psyco.c:1064: fatal error: error writing to -: Broken pipe
compilation terminated.
In file included from c/psyco.c:1:
c/psyco.h:13:3: error: #error "64-bit systems not supported at all. See help on psyco.sf.net"
In file included from c/dispatcher.h:10,
from c/codemanager.h:10,
from c/psyco.c:3:
c/vcompiler.h: In function ‘PsycoObject_New’:
c/vcompiler.h:743: warning: comparison is always false due to limited range of data type
c/vcompiler.h: In function ‘PsycoObject_Resize’:
c/vcompiler.h:757: warning: comparison is always false due to limited range of data type
In file included from c/dispatcher.h:12,
from c/codemanager.h:10,
from c/psyco.c:3:
c/codegen.h:15:3: error: #error "-----------------------------------------------------"
c/codegen.h:16:3: error: #error "Sorry, non-32-bit platforms are not supported at all."
c/codegen.h:17:3: error: #error "You may try with a Python compiled in 32-bit "
c/codegen.h:18:3: error: #error "compatibility mode. Note that Psyco will probably "
c/codegen.h:19:3: error: #error "never support non-32-bit platforms, as it is no "
c/codegen.h:20:3: error: #error "longer actively developed. Instead, the PyPy group "
c/codegen.h:21:3: error: #error "plans to replace it with a more flexible and easily "
c/codegen.h:22:3: error: #error "retargettable Psyco-for-PyPy during the year 2006. "
c/codegen.h:23:3: error: #error "See http://codespeak.net/pypy/ "
c/codegen.h:24:3: error: #error "-----------------------------------------------------"
In file included from c/ivm/iinitialize.h:12,
from c/initialize.h:42,
from c/psyco.c:14:
c/ivm/idispatcher.c: In function ‘psyco_unify’:
c/ivm/idispatcher.c:202: warning: comparison is always false due to limited range of data type
In file included from c/initialize.h:46,
from c/psyco.c:14:
c/dispatcher.c: In function ‘fz_internal_copy’:
c/dispatcher.c:131: warning: comparison is always false due to limited range of data type
c/dispatcher.c: In function ‘fz_compress’:
c/dispatcher.c:233: warning: cast from pointer to integer of different size
c/dispatcher.c:239: warning: cast to pointer from integer of different size
In file included from c/initialize.h:48,
from c/psyco.c:14:
c/psyfunc.c: In function ‘psycofunction_call’:
c/psyfunc.c:801: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
In file included from c/initialize.h:49,
from c/psyco.c:14:
c/stats.c: In function ‘psyco_stats_reset’:
c/stats.c:260: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
c/stats.c: In function ‘psyco_stats_dump’:
c/stats.c:298: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
c/stats.c: In function ‘psyco_stats_top’:
c/stats.c:326: warning: passing argument 2 of ‘PyDict_Next’ from incompatible pointer type
In file included from c/initialize.h:53,
from c/psyco.c:14:
c/codemanager.c: In function ‘psyco_shrink_code_buffer’:
c/codemanager.c:235: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘long int’
In file included from c/initialize.h:60,
from c/psyco.c:14:
c/Objects/pobject.c: In function ‘getdictoffset’:
c/Objects/pobject.c:257: error: ‘SIZE_OF_LONG_BITS’ undeclared (first use in this function)
c/Objects/pobject.c:257: error: (Each undeclared identifier is reported only once
c/Objects/pobject.c:257: error: for each function it appears in.)
In file included from c/initialize.h:61,
from c/psyco.c:14:
c/Objects/pabstract.c:723:3: error: #error "omitted code from Python 2.3 here"
In file included from c/initialize.h:75,
from c/psyco.c:14:
c/Objects/pstructmember.c: In function ‘PsycoMember_GetOne’:
c/Objects/pstructmember.c:16: warning: unused variable ‘w2’
lipo: can't open input file: /var/tmp//ccjHgyCU.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status

Try doing this before compiling:
export ARCHFLAGS="-arch i386"
then in the setup.py
replace
extra_link_args = [ ]
with
extra_link_args = [ '-L/Developer/SDKs/MacOSX10.6.sdk/usr/lib' ]
then just run:
python setup.py install
Hope this helps!

I ran into the same problem on my MacBook Pro using OS X 10.7.
I was able to compile it using "sudo python2.5 setup.py install"
Not it work's like charm. Hope this might help someone else.

I don't have an answer to your question, but as an alternative, did you try installing from the source, as detailed here and here?
Furthermore, you can force 32bit python as well by invoking the command python2.6-32 in the terminal, which may be a bit more convenient for testing purposes.

Why compile things on your own when there is an easy way out?
Install ActivePython 2.6 for Mac
Open Terminal and type pypm install psyco

Related

Compiling Tensorflow with Bazel, error: wrapped_clang failed: error executing command external/local_config_cc/wrapped_clang

Compiling Tensorflow with Bazel, error: wrapped_clang failed: error executing command external/local_config_cc/wrapped_clang
extract of the script in terminal mac os Big Sur 11.5.2 (last update)
INFO: Analyzed target //tensorflow/tools/pip_package:build_pip_package (425 packages loaded, 34109 targets configured).
INFO: Found 1 target...
ERROR: /Users/marcbarbier/tensorflow/tensorflow/python/util/BUILD:198:27: C++ compilation of rule '//tensorflow/python/util:_pywrap_checkpoint_reader.so' failed (Exit 1): wrapped_clang failed: error executing command external/local_config_cc/wrapped_clang '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -g0 -O2 '-D_FORTIFY_SOURCE=1' -DNDEBUG ... (remaining 125 argument(s) skipped)
In file included from tensorflow/python/util/py_checkpoint_reader_wrapper.cc:19:
In file included from bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/arrayobject.h:4:
In file included from bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/ndarrayobject.h:17:
In file included from bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/ndarraytypes.h:4:
bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/npy_common.h:79:9: error: unknown type name 'Py_intptr_t'
typedef Py_intptr_t npy_intp;
^
bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/npy_common.h:80:9: error: unknown type name 'Py_uintptr_t'
typedef Py_uintptr_t npy_uintp;
^
bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/npy_common.h:225:2: error: Must use Python with unicode enabled.
#error Must use Python with unicode enabled.
^
bazel-out/darwin-opt/bin/external/local_config_python/numpy_include/numpy/npy_common.h:873:9: error: unknown type name 'npy_uint16'
typedef npy_uint16 npy_half;
etc......

Installing pypcap on Windows 10 python 2.7 (64 bit)

I'm trying to install pypcap from: https://github.com/dugsong/pypcap/blob/master/INSTALL#L75
I'm trying to install it on Windows 10 - 64 bit and python 2.7.11 64 bit. I downloaded the source and moved it to c:\pypcap. downloaded pyrex and installed it as well. It put the wpdpack files in c:\wpdpack like the install page says. Created the config file and changed the makefile.
I also installed the mingw from their website with the basic package and the g++ package.
I try to do:
C:\pypcap> set PATH=%PATH%;c:\MinGW\bin;c:\Python27
C:\pypcap> mingw32-make
and here it fails, it gets the following error:
In file included from C:\Python27\include/Python.h:8:0,
from pcap.c:4:
C:\Python27\include/pyconfig.h:68:16: fatal error: io.h: No such file or directory
#include <io.h>
so I don't got this io.h file. What can I do to make it compile and use the pypcap?
Before trying that I tried to do
C:\pypcap>pip install pypcap
Collecting pypcap
Using cached pypcap-1.1.4.tar.gz
Complete output from command python setup.py egg_info:
pcap.h not found
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in c:\users\USER\appdata\local\temp\pip-build-fvgkhs\pypcap\
and after that I tried using the wheel download but it failed as well.
Thanks in advance for your help
Unzip the WinPcap Developer pack so that you have C:\WpdPack\Include and C:\WpdPack\Lib
Unzip the pypcap source so that you have C:\pypcap-1.1.4\setup.py
Install the Microsoft Visual C++ Compiler for Python 2.7
Start the relevant cmd prompt for your Python27 bitness from:
Start -> Programs -> Microsoft Visual C++ Compiler Package for Python 2.7
Install/build pypcap from that cmd prompt with:
set INCLUDE=%INCLUDE%;c:\WpdPack\Include
set LIB=%LIB%;c:\WpdPack\Lib
pushd C:\pypcap-1.1.4
python setup.py install
Changed answer
Download https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download.
Run it.
Select:
mingw32-base
mingw32-gcc-g++
Select menu Installtion => Apply Changes
Now you have a fully functional MinGW GCC compiler including header files.
io.h should reside in C:\MinGW\include.
UPDATE
I have successfully compiled it now using Python 2.7.11 (under Wine, since I don't run Windows, but it should be the same) by following the procedure you described in your question.
One thing I had to do was to modify parts of setup.py in pypcap, because it didn't set the proper paths to the pcap includes.
Let me know if/when you get there.
Hope it helps.
CHANGES TO setup.py
Replace the function _pcap_config with this modified version:
def _pcap_config(self, dirs=[ None ]):
cfg = {}
if not dirs[0]:
dirs = [ '/usr', sys.prefix ] + glob.glob('/opt/libpcap*') + \
glob.glob('../libpcap*') + glob.glob('../wpdpack*')
for d in dirs:
for sd in ('include/pcap', 'include', ''):
if os.path.exists(os.path.join(d, sd, 'pcap.h')):
cfg.setdefault('include_dirs', []).append(os.path.join(d, sd))
for d in dirs:
for sd in ('include/pcap', 'include', ''):
for sd in ('lib', 'lib64', ''):
for lib in (('pcap', 'libpcap.a'),
('pcap', 'libpcap.so'),
('pcap', 'libpcap.dylib'),
('wpcap', 'wpcap.lib')):
if os.path.exists(os.path.join(d, sd, lib[1])):
cfg['library_dirs'] = [ os.path.join(d, sd) ]
cfg['libraries'] = [ lib[0] ]
if lib[0] == 'wpcap':
cfg['libraries'].append('iphlpapi')
cfg['extra_compile_args'] = \
[ '-DWIN32', '-DWPCAP' ]
print 'found', cfg
self._write_config_h(cfg)
return cfg
raise Exception("couldn't find pcap build or installation directory")
It basically just adds ALL paths containing pcap.h to the includes.
COMPILATION
Z:\pypcap-master>mingw32-make
python setup.py config --with-pcap=c:\\wpdpack
running config
found {'libraries': ['wpcap', 'iphlpapi'], 'library_dirs': ['c:\\wpdpack\\lib'], 'extra_compile_args': ['-DWIN32', '-DWPCAP'], 'include_dirs': ['c:\\wpdpack\\include/pcap', 'c:\\wpdpack\\include']}
python setup.py build
running build
running build_ext
building 'pcap' extension
creating build
creating build\temp.win32-2.7
creating build\temp.win32-2.7\Release
C:\MinGW\bin\gcc.exe -mdll -O -Wall -Ic:\wpdpack\include/pcap -Ic:\wpdpack\include -IC:\Python27\include -IC:\Python27\PC -c pcap.c -o build\temp.win32-2.7\Release\pcap.o -DWIN32 -DWPCAP
pcap.c: In function '__pyx_f_4pcap_3bpf_filter':
pcap.c:328:48: warning: passing argument 2 of 'PyObject_AsCharBuffer' from incompatible pointer type
__pyx_1 = (PyObject_AsCharBuffer(__pyx_v_buf,(&__pyx_v_p),(&__pyx_v_n)) < 0);
^
In file included from C:\Python27\include/Python.h:133:0,
from pcap.c:4:
C:\Python27\include/abstract.h:476:22: note: expected 'const char **' but argument is of type 'char **'
PyAPI_FUNC(int) PyObject_AsCharBuffer(PyObject *obj,
^
pcap.c:337:86: warning: pointer targets in passing argument 2 of 'bpf_filter' differ in signedness [-Wpointer-sign]
__pyx_1 = (bpf_filter(((struct __pyx_obj_4pcap_bpf *)__pyx_v_self)->fcode.bf_insns,__pyx_v_p,__pyx_v_n,__pyx_v_n) == 0);
^
In file included from pcap.c:30:0:
c:\wpdpack\include/pcap/pcap.h:354:7: note: expected 'const u_char *' but argument is of type 'char *'
u_int bpf_filter(const struct bpf_insn *, const u_char *, u_int, u_int);
^
pcap.c: In function '__pyx_f_4pcap_4pcap_dispatch':
pcap.c:955:91: warning: passing argument 3 of 'pcap_dispatch' from incompatible pointer type
__pyx_v_n = pcap_dispatch(((struct __pyx_obj_4pcap_pcap *)__pyx_v_self)->__pcap,__pyx_1,__pyx_f_4pcap___pcap_handler,((unsigned char *)(&__pyx_v_ctx)));
^
In file included from pcap.c:30:0:
c:\wpdpack\include/pcap/pcap.h:300:5: note: expected 'pcap_handler' but argument is of type 'void (*)(void *, struct pcap_pkthdr *, char *)'
int pcap_dispatch(pcap_t *, int, pcap_handler, u_char *);
^
pcap.c: In function '__pyx_f_4pcap_4pcap_loop':
pcap.c:1059:99: warning: passing argument 3 of 'pcap_ex_next' from incompatible pointer type
__pyx_v_n = pcap_ex_next(((struct __pyx_obj_4pcap_pcap *)__pyx_v_self)->__pcap,(&__pyx_v_hdr),(&__pyx_v_pkt));
^
In file included from pcap.c:31:0:
pcap_ex.h:13:7: note: expected 'u_char **' but argument is of type 'char **'
int pcap_ex_next(pcap_t *pcap, struct pcap_pkthdr **hdr, u_char **pkt);
^
pcap.c: In function '__pyx_f_4pcap_4pcap_sendpacket':
pcap.c:1154:98: warning: pointer targets in passing argument 2 of 'pcap_sendpacket' differ in signedness [-Wpointer-sign]
__pyx_3 = PyInt_FromLong(pcap_sendpacket(((struct __pyx_obj_4pcap_pcap *)__pyx_v_self)->__pcap,__pyx_1,__pyx_2)); if (!__pyx_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; goto __pyx_L1;}
^
In file included from pcap.c:30:0:
c:\wpdpack\include/pcap/pcap.h:311:5: note: expected 'const u_char *' but argument is of type 'char *'
int pcap_sendpacket(pcap_t *, const u_char *, int);
^
pcap.c: In function '__pyx_f_4pcap_4pcap___next__':
pcap.c:1312:99: warning: passing argument 3 of 'pcap_ex_next' from incompatible pointer type
__pyx_v_n = pcap_ex_next(((struct __pyx_obj_4pcap_pcap *)__pyx_v_self)->__pcap,(&__pyx_v_hdr),(&__pyx_v_pkt));
^
In file included from pcap.c:31:0:
pcap_ex.h:13:7: note: expected 'u_char **' but argument is of type 'char **'
int pcap_ex_next(pcap_t *pcap, struct pcap_pkthdr **hdr, u_char **pkt);
^
C:\MinGW\bin\gcc.exe -mdll -O -Wall -Ic:\wpdpack\include/pcap -Ic:\wpdpack\include -IC:\Python27\include -IC:\Python27\PC -c pcap_ex.c -o build\temp.win32-2.7\Release\pcap_ex.o -DWIN32 -DWPCAP
pcap_ex.c: In function 'pcap_ex_next':
pcap_ex.c:237:34: warning: passing argument 3 of 'pcap_next_ex' from incompatible pointer type
return (pcap_next_ex(pcap, hdr, pkt));
^
In file included from pcap_ex.c:16:0:
c:\wpdpack\include/pcap/pcap.h:303:6: note: expected 'const u_char **' but argument is of type 'u_char **'
int pcap_next_ex(pcap_t *, struct pcap_pkthdr **, const u_char **);
^
writing build\temp.win32-2.7\Release\pcap.def
creating build\lib.win32-2.7
C:\MinGW\bin\gcc.exe -shared -s build\temp.win32-2.7\Release\pcap.o build\temp.win32-2.7\Release\pcap_ex.o build\temp.win32-2.7\Release\pcap.def -Lc:\wpdpack\lib -LC:\Python27\libs -LC:\Python27\PCbuild -LC:\Python27\PC\VS9.0 -lwpcap -liphlpapi -lpython27 -lmsvcr90 -o build\lib.win32-2.7\pcap.pyd
Z:\pypcap-master>
LINKING
With MinGW (32-bit) you need a 32-bit Python installation. With a 64-bit Python you need to install MinGW (64-bit).
So you can either install a 32-bit Python or install a 64-bit MinGW.
We are close now, you will make it :-)

clang: error: unknown argument: '-mno-fused-madd'

When installing ReportLab 3.1.8, I ran into the problem where I kept getting the error and I could not find where this compiler option was being set.
The point in setup was:
building 'reportlab.lib._rl_accel' extension
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
Here is my solution.
Cause: I keep my mac up to date and as a result it seems I now have a newer (different) version of the c compiler (clang) than the one that allowed the "-mno-fused-madd" command line switch.
Solution: I did not find the above switch in any file in the reportlab source. It had to be on the computer itself. The culprit seemed to be in the distutils, because setup.py uses module distutils.
The problem was in the file /System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_sysconfigdata.py. This file contains definitions as a dictionary named build_time_vars. We are obviously in the right place as we have a build time problem.
First make a copy as a safeguard.
sudo <editor> <file path> to edit the file.
Then editing this file, search for and remove the switch -mno-fused-madd from the file. I found it in line beginning with 'CFLAGS' since this is a compile flag.
Change the line:
... -fwrapv -mno-fused-madd -DENABLE_DTRACE ... to ... -fwrapv -DENABLE_DTRACE ...
Save the file and continue with your build. It will now stay fixed. No need for environment variables or any such thing.
Edit: While you are at it, remove both _sysconfigdata.pyc and _sysconfigdata.pyo files.
You can still repress these errors from clang by using the following environment variables:
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
A detailed answer to a similar question can be found here:
clang error: unknown argument: '-mno-fused-madd' (python package installation failure)
According to the following the issue has also been fixed in OS X 10.9.3:
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]

command 'gcc' failed with exit status 1 for installation of ngcgh

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...

Error with PyML build

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/"

Categories

Resources