Old 10-28-2014, 05:48 PM   #1
cheyrn
Human being with feelings
 
Join Date: Oct 2014
Posts: 67
Default python windows and reaper

I have python 3.4.2 and python 2.7.8 64bit and 64bit Windows 8. I have pointed reaper to each, alternately. Enable ReaScript/Python is checked. If I view reascript help it says python3.dll is installed, or if I am using 2.7 it says python27.dll is installed.

But, if I try to load a python script I get the error message "py" extension is not supported. I also tried creating a python with the editor that is set and saving it and running it and I get the same error message.

Python is on the system path. The "py" file extension is assigned to python in windows explorer.

Do you have any idea what the problem is or what else I can do to try to figure out what the problem is?
cheyrn is offline   Reply With Quote
Old 10-30-2014, 03:06 AM   #2
azimuth
Human being with feelings
 
Join Date: Apr 2014
Location: The place that's round on the ends and high in the middle
Posts: 111
Default

I had a similar problem and it was caused by accidentally downloading and installing the 32 bit version of Python in 64 bit Windows. If your Python34.dll file is in the SysWOW64 folder, you've got the 32 bit version.
azimuth is offline   Reply With Quote
Old 10-30-2014, 09:04 AM   #3
cheyrn
Human being with feelings
 
Join Date: Oct 2014
Posts: 67
Default

It was something like that. Thanks! That's weird, 32bit dll in syswow64.

I had 32bit python2.7.6, 64bit python2.7.8 and 64bit python3.4.2.

I tried specifying Windows\Syswow64\python27.dll and the script didn't run. Then I tried \Python34\DLLs\python3.dll and it didn't run.

So, I uninstalled 32bit python, After which there are now these dlls:

\Python34\DLLs\python3.dll
\Windows\System32\python27.dll
\Windows\System32\python34.dll


Using Windows\System32\python27.dll the script now runs. It also runs using Windows\System32\python34.dll.

If I don't force the name of the dll, it says no compatible version if I set the path to \Python34\Dlls. If I point at \Windows\System32 it says python27.dll is installed.

I guess the 32bit dll was in SysWOW64 and the 64bit dll was in System32.
cheyrn is offline   Reply With Quote
Old 10-30-2014, 12:34 PM   #4
azimuth
Human being with feelings
 
Join Date: Apr 2014
Location: The place that's round on the ends and high in the middle
Posts: 111
Default

I don't know if this is related but as of Reaper 4.74 pre4, Python 3.4 is detected automatically. If you're running an earlier version, perhaps that's why only python27.dll shows up as installed. Just a guess but glad its working for you now.
azimuth is offline   Reply With Quote
Old 10-30-2014, 06:40 PM   #5
Paul99
Human being with feelings
 
Join Date: Aug 2014
Location: Netherlands
Posts: 594
Default

Quote:
Originally Posted by azimuth View Post
I don't know if this is related but as of Reaper 4.74 pre4, Python 3.4 is detected automatically. If you're running an earlier version, perhaps that's why only python27.dll shows up as installed. Just a guess but glad its working for you now.
I really hope that the new version of Reaper will do that. I tried both versions of Python. I tried every directory where a Python .dll file was, but nothing appeared to work. Always the same error: Extension not supported: "py".
So keep my fingers crossed for v4.74!
Paul99 is offline   Reply With Quote
Old 11-03-2014, 08:55 AM   #6
lockettpots
Human being with feelings
 
Join Date: May 2011
Posts: 28
Default

@chern

Thanks for this. I have been pulling my hair out trying to get it to work (and I've not got much left anyway).

I too have found my 64bit .dll in the System32 folder (wtf) and I have just successfully run a test .py file.

Once again thanks a bunch.
lockettpots is offline   Reply With Quote
Old 11-04-2014, 02:11 PM   #7
cheyrn
Human being with feelings
 
Join Date: Oct 2014
Posts: 67
Default

Thanks should go to azimuth.

I wish I had thought to try to find out what dll is being used. I can run python and then:

tasklist /m python*

would have shown me that it is not using python3.dll. But, it doesn't tell you which directory the dll it is using was found in.

This annoyingly verbose C# does that:

Code:
using System;
using System.Diagnostics;

namespace ProcessDlls
{
    class Program
    {
        static void Main(string[] args)
        {
            foreach (Process p in Process.GetProcesses()) {
                if (p.ProcessName.Contains("python"))
                {
                    Console.WriteLine(p.ProcessName);
                    foreach (ProcessModule m in p.Modules) {
                        if (m.FileName.Contains("python"))
                        Console.WriteLine(m.FileName);
                    }
                }
            }
        }
    }
}
which you can compile with something like:

\Windows\Microsoft.NET\Framework64\v4.0.30319\csc some.cs

Last edited by cheyrn; 11-04-2014 at 02:12 PM. Reason: OCD
cheyrn is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 08:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2017, vBulletin Solutions Inc.