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

Windows: no python engine found #5080

Closed
veksha opened this issue May 16, 2023 · 29 comments
Closed

Windows: no python engine found #5080

veksha opened this issue May 16, 2023 · 29 comments

Comments

@veksha
Copy link
Contributor

veksha commented May 16, 2023

NOTE: No Python 3 engine found. Python plugins don't work now. To fix this:
place near cudatext.exe: python3x.dll, python3x.zip, python3xdlls\*.pyd, MS VS Runtime.
Startup: 260ms, plugins: 0ms ()
@pintassilgo
Copy link

pintassilgo commented May 17, 2023

This probably broken Python engine for me on Linux.

Plugins are no longer loading, and clicking Plugins menu shows nothing. Console:

NOTE: No Python 3 engine found. Python plugins don't work now. To fix this:
write "pylib__linux" to user.json. Read about "pylib" in "Options / Settings-default".
or use the menu item "Plugins / Python engine was not found; find it..."

This is a regression from recent beta. v1.194.0.0 release is not affected.

@Alexey-T
Copy link
Owner

I changed default value of “pylib__linux”. Old value crashed on Arch Linux. Pls set explicit value, ok?

@Alexey-T Alexey-T reopened this May 17, 2023
@Alexey-T
Copy link
Owner

use the menu item "Plugins / Python engine was not found; find it..."

@pintassilgo
Copy link

pintassilgo commented May 17, 2023

This issue is causing the Plugins menu to not work for me, so I cant fix this way.

@Alexey-T
Copy link
Owner

Alexey-T commented May 17, 2023

I cannot repro the EMPTY plugins menu...

Then try the 1st method:
write "pylib__linux" to user.json. Read about "pylib" in "Options / Settings-default".

quote:

  //  Instruction for Linux/FreeBSD/Solaris, if Python engine not auto-detected:
  //  1) open file manager, go to /usr
  //  2) search for "libpython3.*so*"
  //     Terminal command:
  //     $ find /usr -name 'libpython3.*so*' 2>/dev/null
  //
  //  3) if not found, install Python 3, goto step 2
  //  4) in user.json, set "pylib__linux" (or "pylib__freebsd" etc) to one
  //     of the found filenames. for example:
  //     "pylib__linux" : "/usr/lib/x86_64-linux-gnu/libpython3.7m.so.1.0",

@pintassilgo
Copy link

Thanks, this fixed it for me.

But since this was never an issue until yesterday, I suggest to think in a fix in Cuda side to not affect other Linux users.

@pintassilgo
Copy link

And the returning of the plugins also made the Plugins menu to work again.

@Alexey-T
Copy link
Owner

I found why we miss now the 'find python library' menu item, fixed it. thanks for note.

@pintassilgo
Copy link

Is 'find python library' the only menu item under Plugins menu when python is not recognized? Because as I said, without recognized python the Plugins menu doesn't open at all, clicking it shows nothing.

@Alexey-T
Copy link
Owner

Alexey-T commented May 17, 2023

Is 'find python library' the only menu item under Plugins menu when python is not recognized?

yes. But not on Win+macOS.

@Alexey-T
Copy link
Owner

In the 'minimap scroll' isssue - you can get last beta which must have the menuitem.

@Alexey-T
Copy link
Owner

@pintassilgo Confirm that the menu item 'find python lib' appeared and works (when you rename option "pylib__linux").

@pintassilgo
Copy link

pintassilgo commented May 17, 2023

Confirmed. But it didn't find anything with default value /usr/lib. I need to change to /usr/lib64 or simply /usr for it to work.

image

@Alexey-T
Copy link
Owner

New beta must detect 'usr/lib64' if it exists.
cudatext.zip

@Alexey-T Alexey-T reopened this May 17, 2023
@pintassilgo
Copy link

No change from this build, still suggesting /usr/lib and not finding results with this value.

@Alexey-T
Copy link
Owner

Alexey-T commented May 17, 2023

What if you enter in terminal ls /usr ? what dirs are there?

@pintassilgo
Copy link

bin  etc  include  lib  lib64  libexec  local  sbin  share  src  x86_64-suse-linux  x86_64-w64-mingw32

@Alexey-T
Copy link
Owner

Ok. what is the final value of "pylib__linux"?

@pintassilgo
Copy link

There are many possibilities

/usr/lib64/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so
/usr/lib64/libpython3.8.so
/usr/lib64/python3.10/config-3.10-x86_64-linux-gnu/libpython3.10.so
/usr/lib64/libpython3.10.so
/usr/lib64/python3.9/config-3.9-x86_64-linux-gnu/libpython3.9.so
/usr/lib64/libpython3.so
/usr/lib64/libpython3.9.so
/usr/lib64/libpython3.10.so.1.0
/usr/lib64/libpython3.8.so.1.0
/usr/lib64/libpython3.9.so.1.0

I'm using /usr/lib64/libpython3.10.so, but don't know the difference for /usr/lib64/libpython3.10.so.1.0, for instance.

And honestly I don't believe users should need to worry about this. Until yesterday it was working fine without any user interference, never needed to know about this pylib__linux option which was unset.

@pintassilgo
Copy link

pintassilgo commented May 17, 2023

Someday my Python will update to 3.11 and I shouldn't care, but this day Cuda will start using the not-the-most-recent version (3.10) because since yesterday it's requiring user to manually set the path...

@Alexey-T
Copy link
Owner

I had changed the default of 'pylib' because user told me he sees the crash with the OLD default value, on ArchLunux.

@Alexey-T
Copy link
Owner

New beta must detect your python better:
cudatext.zip

@pintassilgo
Copy link

pintassilgo commented May 17, 2023

Thanks, now it looks fixed. Removed pylib__linux, restarted and everything is still working, as it always was until yesterday.

@Alexey-T
Copy link
Owner

Note: autodetection of 'pylib' operates with file system, and fixed value in user.json is faster.

@pintassilgo
Copy link

So maybe cache the value?

@Alexey-T
Copy link
Owner

The user.json is the 'cache' here..

@pintassilgo
Copy link

If that's the best way, Cuda should write in the file after the autodetection.

@pintassilgo
Copy link

The last build you gave is gtk2, I can't use it due to #5003, could you please give me the Qt5 one?

@Alexey-T
Copy link
Owner

Beta
cudatext-qt5.zip

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