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

Problem with Python 2.7.x #37

Closed
Jens01 opened this issue Sep 1, 2016 · 1 comment
Closed

Problem with Python 2.7.x #37

Jens01 opened this issue Sep 1, 2016 · 1 comment

Comments

@Jens01
Copy link

Jens01 commented Sep 1, 2016

When I want to use Python 2.7.x I have to insert some lines in PythenEngine.pas :

In line 4794 :

  AssignPyFlags;
  if DirectoryExists('C:\Python27') then
    Py_SetPythonHome('C:\Python27')
  else
    raise Exception.Create('Pythonfolder not found : "C:\Python27"');
  Py_Initialize;

and before Py_Initialize: procedure; cdecl; in line 1683:
Py_SetPythonHome: procedure ( s: PAnsiChar); cdecl;

and before Py_Initialize := Import('Py_Initialize'); in line 3742 :
Py_SetPythonHome := Import('Py_SetPythonHome');

@pyscripter
Copy link
Owner

None of the above is needed.
If you are using a registered Python 2.7 from www.python.org all you have to do is
Uncheck Use last known version.
Set RegVersion to 2.7
and DLLName to python27.dll

If you are using some other installation of python (I see you have it in "C:\Python27") you need to also fill the DLLPath. For example you can set it to "C:\Python27".

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

2 participants