Error while installing pyo

147 views
Skip to first unread message

Harshal Gondkar

unread,
Jul 25, 2022, 10:18:08 AM7/25/22
to pyo-discuss
Hi, 
I am new to pyo and wanted to use it for college final year project. But, I have encountered an issue while downloading it on my device.

I am using Windows 11 with Python 3.7 version installed. 
I have used this link to go through my installation process. 
Steps to download pyo on Windows
(If the link is not opening, please refer this file on the pyo repo on github  "pyo/scripts/win/windows-10-64bit-build-routine.txt"

I am stuck on the last step of the process, where you download pyo sources from git and build it. 
I went to "pyo/" directory which holds the setup.py file. and run this command "py -3.7 setup.py install --use-double"

I ran in an error while executing this...


```
C:\Users\Admin\Desktop\Codes\TYPROJECT\pyo>py -3.7 setup.py install --use-double
running install
running bdist_egg
running egg_info
writing pyo.egg-info\PKG-INFO
writing dependency_links to pyo.egg-info\dependency_links.txt
writing entry points to pyo.egg-info\entry_points.txt
writing top-level names to pyo.egg-info\top_level.txt
reading manifest file 'pyo.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'pyo.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
running build_ext
dllwrap: WARNING: dllwrap is deprecated, use gcc -shared or ld -shared instead

building 'pyo._pyo' extension
C:\msys64\mingw64\bin\gcc.exe -mdll -O -Wall -DUSE_PORTAUDIO -DUSE_PORTMIDI -DUSE_OSC -DMS_WIN64 -I../vcpkg/packages/portmidi_x64-windows/include -I../vcpkg/packages/portaudio_x64-windows/include -I../vcpkg/packages/libsndfile_x64-windows/include -I../vcpkg/packages/liblo_x64-windows/include -I../vcpkg/packages/pthreads_x64-windows/include -IC:\msys64\mingw64\include -Iinclude -IC:\Users\Admin\AppData\Local\Programs\Python\Python37\include -IC:\Users\Admin\AppData\Local\Programs\Python\Python37\include -c src/engine\pyomodule.c -o build\temp.win-amd64-3.7\Release\src\engine\pyomodule.o -Wno-strict-prototypes -Wno-strict-aliasing -O3 -g0 -DNDEBUG
src/engine\pyomodule.c:25:10: fatal error: sndfile.h: No such file or directory
   25 | #include "sndfile.h"
      |          ^~~~~~~~~~~
compilation terminated.
error: command 'C:\\msys64\\mingw64\\bin\\gcc.exe' failed with exit status 1

```


So, it says sndfile.h was not found. I have searched on google but cannot find a proper solution. I tried re installing libsndfile on vcpkg but the problem still persists. 


Kindly look into this, it would mean a lot to me. 
Thank you.

Olivier Bélanger

unread,
Jul 25, 2022, 11:49:34 AM7/25/22
to pyo-d...@googlegroups.com
Hi,

You should not try to compile pyo yourself... Just install it with pip:

py -3.7 -m pip install pyo

You should be ready to go. You can add wxPython to the module to install if you want to use GUI parts from pyo!

py -3.7 -m pip install pyo wxPython

Olivier



--
You received this message because you are subscribed to the Google Groups "pyo-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pyo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pyo-discuss/e9263f23-66ea-4fc9-95a4-4acc0fb28dc5n%40googlegroups.com.

Harshal Gondkar

unread,
Jul 26, 2022, 2:37:32 PM7/26/22
to pyo-discuss
Hi!
Thank you so much for your reply!

Shall I also bring another issue here?
I am currently going through the documentation of pyo. 
I tried running a few example files under pyo/examples/ . 
Python scripts that contained SndTable gave this error:


Traceback (most recent call last):
  File "c:/Users/Admin/Desktop/Codes/TYPROJECT/pyo/pyo/examples/10-tables/04-granulation.py", line 26, in <module>
    snd = SndTable("../snds/baseballmajeur_m.aif")
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\pyo\lib\tables.py", line 1650, in __init__
    _size, _dur, _snd_sr, _snd_chnls, _format, _type = sndinfo(p)
TypeError: cannot unpack non-iterable NoneType object


 Kindly look into this and please provide guidance. 
Thank you

Olivier Bélanger

unread,
Jul 26, 2022, 2:47:19 PM7/26/22
to pyo-d...@googlegroups.com
Hi,

Is the "snds" folder in the "examples" folder, next to "10-tables" ?

Olivier


Message has been deleted

Harshal Gondkar

unread,
Aug 1, 2022, 5:31:33 PM8/1/22
to pyo-discuss
Yes, "snds" folder is is inside "examples" folder and at the same level as "10-tables". (Same structure as on pyo git repo)
Reply all
Reply to author
Forward
0 new messages