[Csnd-dev] python import problem of build
Date | 2018-05-23 20:42 |
From | "Worrall, David" |
Subject | [Csnd-dev] python import problem of build |
Hello all!, (I’m back again, after a couple of years of admin hell, so I’m a bit behind the csound times… :-( I’m about to run another python/csound workshop for ICAD, so I tried to do a bog-standard install (OSX) of the csound: latest dmg (6.11.0) in order to access it via the OS’s bog standard python (2.7.10) Result: import error Exception report: C02S424ZG8WN2:Python davidworrall$ cd ~ C02S424ZG8WN2:~ davidworrall$ which python /usr/bin/python C02S424ZG8WN2:~ davidworrall$ python Python 2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import csnd6 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/csnd6.py", line 17, in <module> _csnd6 = swig_import_helper() File "/Library/Python/2.7/site-packages/csnd6.py", line 16, in swig_import_helper return importlib.import_module('_csnd6') File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) ImportError: dlopen(/Library/Python/2.7/site-packages/_csnd6.so, 2): Library not loaded: @rpath/libcsnd6.6.0.dylib Referenced from: /Library/Python/2.7/site-packages/_csnd6.so Reason: image not found Here’s the offending linked path: /Library/Python/2.7/site-packages/_csnd6.so -> /Library/Frameworks/CsoundLib64.framework/Resources/Python/Current/_csnd6.so C02S424ZG8WN2:Python davidworrall$ ls -l /Library/Frameworks/CsoundLib64.framework/Resources/Python/Current/ total 4792 -rwxrwxr-x 1 root wheel 2132108 May 11 04:02 _csnd6.so -rwxrwxr-x 1 root wheel 197302 May 11 04:02 csnd6.py -rwxrwxr-x 1 root wheel 115138 May 11 04:02 ctcsound.py This dynlib has been installed: -rwxrwxr-x 1 root wheel 453436 May 11 04:02 /Library/Frameworks/CsoundLib64.framework/Versions/6.0/libcsnd6.6.0.dylib I’m guessing that, following installation, @rpath/libcsnd6.6.0.dylib Does not point to this. Is that analysis correct or is the likely to be something else? Many thanks, David PS installation of 10.6.8 works fine. --- Prof David Worrall, PhD Audio Arts and Acoustics Columbia College Chicago 33 E Congress Pkwy Room 601N Chicago, ILLINOIS, USA 60605 Tel: (1)312.369.8821 Fax: (1)312.369.8427 Wikipedia: David Worrall Personal research/creative practice website: avatar.com.au President, International Community for Auditory Display icad.org
|
Date | 2018-05-23 21:08 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] python import problem of build |
We’ll check that, bu also why don’t you try ctcsound instead of csnd6?
Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland
|
Date | 2018-05-23 21:15 |
From | "Worrall, David" |
Subject | Re: [Csnd-dev] python import problem of build |
Hi Victor, I tried to import ctcsound, with the same outcome. (I’m yet to find documentation on ctcsound – I checked the mail lists; also for this problem) without success, at this point in time. I’m guessing I can piece something together from the API pages on csounds.com, but without a successful import, that is mute 😊
David --- Prof David Worrall, PhD Audio Arts and Acoustics Columbia College Chicago 33 E Congress Pkwy Room 601N Chicago, ILLINOIS, USA 60605 Tel: (1)312.369.8821 Fax: (1)312.369.8427 Wikipedia: David Worrall Personal research/creative practice website: avatar.com.au President, International Community for Auditory Display icad.org From:
Csound-developers <CSOUND-DEV@LISTSERV.HEANET.IE> on behalf of Victor Lazzarini <Victor.Lazzarini@MU.IE> We’ll check that, bu also why don’t you try ctcsound instead of csnd6? Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland
|
Date | 2018-05-23 21:21 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] python import problem of build |
yes, I am seeing the same thing. I have not noticed this before because everything works fine with python.org python and I have not used the python supplied by Apple for many years. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 May 2018, at 21:15, Worrall, David |
Date | 2018-05-23 21:32 |
From | "Worrall, David" |
Subject | Re: [Csnd-dev] python import problem of build |
I understand – personally I use the Anaconda python and have had to build my own csound from sources for it: Haven’t done it for a couple of years though… If the problem proves difficult, I can recommend workshop participants use the python.org python – especially if that download version works on all platforms.
My first preference is to use the Anaconda framework but when I tried last time, the csound.dmg would not install with it.
Thanks for your time… David (I’ve been teaching with csound 6.08 & the OSX python 7.7 for the last year with no problems: solid as a rock, though I bits are deprecating). --- Prof David Worrall, PhD Audio Arts and Acoustics Columbia College Chicago 33 E Congress Pkwy Room 601N Chicago, ILLINOIS, USA 60605 Tel: (1)312.369.8821 Fax: (1)312.369.8427 Wikipedia: David Worrall Personal research/creative practice website: avatar.com.au President, International Community for Auditory Display icad.org From:
Csound-developers <CSOUND-DEV@LISTSERV.HEANET.IE> on behalf of Victor Lazzarini <Victor.Lazzarini@MU.IE>
fine with python.org python and I have not used the python supplied by Apple for many years. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952
|
Date | 2018-05-23 21:42 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] python import problem of build |
I think the python.org could be recommended anyway, since it’s four subversions ahead of the apple supplied one. I am looking at a solution here for the apple python and I’ll see if I can sort it. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 May 2018, at 21:32, Worrall, David |
Date | 2018-05-23 21:57 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] python import problem of build |
Well, this is very strange. I noticed I had some development installation of the the Python modules in $HOME/Library/Python/… so I deleted that directory completely. Now Apple Python loads the module without any problems: MacBook-Pro:~ victor$ /usr/bin/python Python 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import csnd6 >>> quit() I still have problems with ctcsound and apple python, but at least csnd6 loads. Check if this rings any bells for you. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 May 2018, at 21:42, Victor Lazzarini |
Date | 2018-05-23 22:07 |
From | "Worrall, David" |
Subject | Re: [Csnd-dev] python import problem of build |
I don’t have a $HOME python library, so it didn’t sole it for me :-( I’ll check this on a 2nd machine I tried to run the installer on as well. @d --- Prof David Worrall, PhD Audio Arts and Acoustics Columbia College Chicago 33 E Congress Pkwy Room 601N Chicago, ILLINOIS, USA 60605 Tel: (1)312.369.8821 Fax: (1)312.369.8427 Wikipedia: David Worrall Personal research/creative practice website: avatar.com.au President, International Community for Auditory Display icad.org From:
Csound-developers <CSOUND-DEV@LISTSERV.HEANET.IE> on behalf of Victor Lazzarini <Victor.Lazzarini@MU.IE>
$HOME/Library/Python/… so I deleted that directory completely. Now Apple Python loads the module without any problems: MacBook-Pro:~ victor$ /usr/bin/python Python 2.7.10 (default, Oct 6 2017, 22:29:07) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin Type "help", "copyright", "credits" or "license" for more information.
I still have problems with ctcsound and apple python, but at least csnd6 loads. Check if this rings any bells for you. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952
|
Date | 2018-05-23 22:16 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] python import problem of build |
And even more strangely, the python.org python fails to find the modules now, even though the apple one does. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 May 2018, at 22:07, Worrall, David |
Date | 2018-05-23 22:19 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] python import problem of build |
But python3 has no problem finding ctcsound... ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 May 2018, at 22:16, Victor Lazzarini |
Date | 2018-05-23 22:21 |
From | "Worrall, David" |
Subject | Re: [Csnd-dev] python import problem of build |
Well I’m glad it is not just my stupidity :-) I also checked.bash_profile (looking for an $OPCODE6DIR64 conflict) to see if there is anything funny going on there, without a result. --- Prof David Worrall, PhD Audio Arts and Acoustics Columbia College Chicago 33 E Congress Pkwy Room 601N Chicago, ILLINOIS, USA 60605 Tel: (1)312.369.8821 Fax: (1)312.369.8427 Wikipedia: David Worrall Personal research/creative practice website: avatar.com.au President, International Community for Auditory Display icad.org From:
Csound-developers <CSOUND-DEV@LISTSERV.HEANET.IE> on behalf of Victor Lazzarini <Victor.Lazzarini@MU.IE>
apple one does. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952
|
Date | 2018-05-23 22:45 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] python import problem of build |
So, for some reason python.org python (2.7.15) cannot find any packages installed in site-packages. If we point the PYTHONPATH to that directory, then it finds them alright and they get loaded. Apple python works, so I should expect it to work there too. The library that does not seem to be found has a symlink in /usr/local/lib/libcsnd6.6.0.dylib which should be enough for it to be located. This is on a 10.13.4 mac. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 23 May 2018, at 22:21, Worrall, David |