Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python opcodes no longer working on Windows.. #15

Open
rorywalsh opened this issue Oct 12, 2022 · 5 comments
Open

Python opcodes no longer working on Windows.. #15

rorywalsh opened this issue Oct 12, 2022 · 5 comments

Comments

@rorywalsh
Copy link
Collaborator

rorywalsh commented Oct 12, 2022

I'm just posting this here to remind me to investigate the issue when I have a chance, but after building a new version with the latest build of csound I get an error when trying pyinit:


Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

When I prepared binaries for Windows in Aug 2021 these opcodes worked. I am using the same toolchain to build now as I did then, and I haven't changed or updated Python since. Anyone have ideas where I should start looking?

@vlazzarini
Copy link
Member

It could be a problem with the Python installation. It's working on MacOS, I tried the binaries from the installer yesterday using a universal build of Csound (beta 6.18) and CsoundQT (x86_64) on a Mac M1 and it runs correctly.

@rorywalsh
Copy link
Collaborator Author

Could be, but Python3 is running fine on my machine, CMake finds it without any issues. I'm hesitant to mess with my Python install as it took me some time to get it working with all the various libraries I need. I'm happy to help another Windows user try to get them working on their PC.

@steemsteem
Copy link

steemsteem commented Oct 15, 2022

Hi! I made a built of the python opcode on a windows 11 machine. The built went through. But when I try to start it from within the commandline or CsoundQT i get the following messages:

CSOUNDQT:

error: syntax error, unexpected NEWLINE  (token "
") from file C:/CsoundQt-0.9.8-Win64/bin/2.csd (1)
 line 13:
>>>pyinit <<<
Unexpected untyped word pyinit when expecting a variable
Parsing failed due to invalid input!
Stopping on parser failure
cannot compile orchestra

CSOUND COMMANDLINE with cmd: csound pyinit:

csound pyinit
0dBFS level = 32768.0
--Csound version 6.16 (double samples) Jun 12 2021
[commit: 49c8f7a674d0c25d3c78f63ceeb79d77c48e3e25]
libsndfile-1.0.31
WARNING: could not open library 'C:\Program Files\csound\plugins64\py.dll' (-1)

Correct path to py.dll:
image

Python3 cmd:
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

py cmd:
Python 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

@rorywalsh
Copy link
Collaborator Author

Perhaps you're building for x86 instead of x64? Can you open the MSVC .sln and make sure you have x64 selecting in the configuration panel?

image

@steemsteem
Copy link

@rorywalsh sorry for the late response. Yeah built it with debug x64 in visual studio 2022. Py opcode still not working

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants