cleemesser / pyo

Automatically exported from code.google.com/p/pyo
GNU General Public License v3.0
0 stars 0 forks source link

problem in installing pyo-0.6.9 on Mac OS Mavericks (ipython anaconda) #58

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Hello. I tried to install from source pyo 0.6.9 on my Mac with Mavericks OS, 
but I have a problem. Here they are the steps I followed.

(1) I downloaded pyo-0.6.9_src.tar.bz2 from 
http://ajaxsoundstudio.com/software/pyo/

(2) After unzip, I entered the pyo-0.6.9_src directory and ran sh 
scripts/get_dependencies_x86_64.sh. No problem.

(3) Then I ran sudo python setup.py --use-double --use-coreaudio --use-jack 
install but I have the following error

running install
running build
running build_py
creating build
creating build/lib.macosx-10.6-intel-2.7
copying pyo.py -> build/lib.macosx-10.6-intel-2.7
copying pyo64.py -> build/lib.macosx-10.6-intel-2.7
creating build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/__init__.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/_core.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/_maps.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/_tkwidgets.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/_widgets.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/_wxwidgets.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/analysis.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/arithmetic.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/controls.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/dynamics.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/effects.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/filters.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/fourier.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/generators.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/matrix.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/matrixprocess.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/midi.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/opensndctrl.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/pan.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/pattern.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/phasevoc.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/players.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/randoms.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/server.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/tableprocess.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/tables.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/triggers.py -> build/lib.macosx-10.6-intel-2.7/pyolib
copying pyolib/utils.py -> build/lib.macosx-10.6-intel-2.7/pyolib
creating build/lib.macosx-10.6-intel-2.7/pyolib/snds
copying pyolib/snds/__init__.py -> build/lib.macosx-10.6-intel-2.7/pyolib/snds
copying pyolib/snds/accord.aif -> build/lib.macosx-10.6-intel-2.7/pyolib/snds
copying pyolib/snds/IRMediumHallStereo.wav -> 
build/lib.macosx-10.6-intel-2.7/pyolib/snds
copying pyolib/snds/transparent.aif -> 
build/lib.macosx-10.6-intel-2.7/pyolib/snds
running build_ext
gcc-4.2 not found, using clang instead
building '_pyo' extension
creating build/temp.macosx-10.6-intel-2.7
creating build/temp.macosx-10.6-intel-2.7/src
creating build/temp.macosx-10.6-intel-2.7/src/engine
creating build/temp.macosx-10.6-intel-2.7/src/objects
clang -fno-strict-aliasing -fno-common -dynamic -arch i386 -arch x86_64 -g -O2 
-DNDEBUG -g -O3 -DUSE_JACK -DUSE_COREAUDIO -DTIMESTAMP="21 Apr 2014 18:49:10" 
-Iinclude -I/usr/local/include -I/opt/local/include 
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c 
src/engine/pyomodule.c -o 
build/temp.macosx-10.6-intel-2.7/src/engine/pyomodule.o -Wno-strict-prototypes 
-O3
In file included from src/engine/pyomodule.c:26:
include/servermodule.h:37:10: fatal error: 'jack/jack.h' file not found
#include <jack/jack.h>
         ^
1 error generated.
error: command 'clang' failed with exit status 1

(4) so I removed the flag --use-jack and it worked, creating the folder "build".

(5) I added to my .bashrc the following line

export PYTHONPATH=/Users/Marco/Documents/pyo_0.6.9-src:$PYTHONPATH

(6) Then I entered iPython (I installed the anaconda version) and try to import 
pyo (or pyo64) and I have the following error (for pyo, but it is the same for 
pyo64):

IPython 2.0.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
Using matplotlib backend: MacOSX

In [1]: from pyo import *
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-b4c8034a9726> in <module>()
----> 1 from pyo import *

/Users/Marco/Documents/pyo_0.6.9-src/pyo.py in <module>()
     54
     55 from pyolib._maps import *
---> 56 import pyolib.analysis as analysis
     57 from pyolib.analysis import *
     58 import pyolib.controls as controls

/Users/Marco/Documents/pyo_0.6.9-src/pyolib/analysis.py in <module>()
     28 """
     29
---> 30 from _core import *
     31 from _maps import *
     32

/Users/Marco/Documents/pyo_0.6.9-src/pyolib/_core.py in <module>()
     30 else:
     31     import pyo as current_pyo
---> 32     from _pyo import *
     33
     34 from _maps import *

ImportError: No module named _pyo

(7) Then I tried to run Python (not iPython) from the terminal and, if I can 
run from pyo import * (or from pyo64 import *)

but running a command as in the first example of the Ajax website, i.e.

s = Server().boot()

I have again a Segmentation Fault:11 as below.

Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pyo64 import *
pyo version 0.6.9 (uses double precision)
>>> s = Server().boot()

Segmentation fault: 11

P.S. I noticed that which ipython gives

/Users/Marco/anaconda/bin/ipython

while which python gives

/usr/local/bin/python

Anyway, I would like to be able to run pyo inside ipython...

Any help would be appreciated! Cheers!

Original issue reported on code.google.com by marcop...@gmail.com on 21 Apr 2014 at 5:00

GoogleCodeExporter commented 8 years ago
Hi,

If you want to compile with jack, you must install JackOSX. Also, the 
get_dependencies scripts are deprecated. You should install dependencies with 
Homebrew (as indicated in the wiki:

https://code.google.com/p/pyo/wiki/Installation

First, make sure you can run pyo in the standard python and after that, we'll 
probably be able to make it work under ipython.

Olivier

Original comment by belan...@gmail.com on 21 May 2014 at 7:25

GoogleCodeExporter commented 8 years ago
Hello Olivier,

    finally I installed homebrew (after moving macports from /opt/local to /macports) and I ran 

brew install python liblo libsndfile portaudio portmidi

I followed the steps to install pyo-0.7.1 on MacOS (Mavericks) on 
https://code.google.com/p/pyo/wiki/Installation

I got the last version of the source code and then I ran

sudo sh scripts/compile_OSX.sh

After opening Python from the terminal, now the command

from pyo import *

works and this is the output:

Python 2.7.3 (v2.7.3:70274d53c1dd, Apr  9 2012, 20:52:43)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.

pyo version 0.7.1 (uses single precision)

WxPython is not found for the current python version.
Pyo will use a minimal GUI toolkit written with Tkinter.
This toolkit has limited functionnalities and is no more
maintained or updated. If you want to use all of pyo's
GUI features, you should install WxPython, available here:
http://www.wxpython.org/

However, if I run 

s = Server().boot()

I have

Segmentation fault: 11

About the error for WxPython, I tried to install it through

brew install wxmac

but I have the same warning when importing pyo.

Could you help me, please? I am really interested to check the potentialities 
of your code!
I would also like, if possible, to use ipython instead of python.

Original comment by marcop...@gmail.com on 28 Sep 2014 at 11:10