1

The issue

I developed a PyQt app that uses NLTK to throw item recommendations based on a query, and now I need to package it into a standalone app. After checking the internet for weeks, I tried fbs, but ended up going to pyinstaller. When I tweaked the necessary things, the app was succesfully built... For Linux. Issue here is, I need it to be able to run on Windows, and I'm using Ubuntu.

In order to package it for Windows, I read everywhere that the best choice is to just wine pyinstaller and call it a day, but when I do that, I end up with this error message:

OSError [WinError 127] Procedure not found: 'RtlIpv6AddressToStringA'

For what I can collect, this is a semi-usual thing, since it looks like NLTK and PyInstaller do not get along well.

What I tried

  • Modifying hook-nltk.py and changed the lines regarding nltk_data
  • Using PyInstaller with the .py file as well as the .spec file
  • Looking pretty much everywhere finding someone with a similar problem, to no avail
eyllanesc
  • 235,170
  • 19
  • 170
  • 241
Mad Man
  • 27
  • 1
  • Usually you need to make sure to build the exe on at least the same or older Windows version which you are planning to run it. That means a built made on Win10 isn't guaranteed to run on Win7. – Maurice Meyer Jul 14 '21 at 08:44
  • That's good to know, since I have no idea what's the kind of Windows machine it'll be running on, but I don't see how this relates to the OSError problem. I'm building it on an Ubuntu system using wine. – Mad Man Jul 14 '21 at 09:05
  • According to https://learn.microsoft.com/en-us/windows/win32/api/ip2string/nf-ip2string-rtlipv6addresstostringa, it depends on `ntdll.dll`, I interpret the error message like the DLL was found, but the function is not there ?! Probably you need to check if the DLL is added to the build and/or include the version from Wine into your build. – Maurice Meyer Jul 14 '21 at 09:46
  • Right now, as far as I'm concerned, this `ntdll.dll` is present on Wine's `drive_c/windows/system32` as well as in `drive_c/windows/systemwow64`. I don't know if you're talking about this or specifically in the project folder. Anyhow, it **is* there, so I'm guessing it's not that? – Mad Man Jul 16 '21 at 07:03
  • Which of them is added to the exe ? Possibly it's just a 32/64bit issue ... – Maurice Meyer Jul 16 '21 at 08:09
  • You're probably using an old version of Wine that doesn't have RtlIpv6AddressToStringA. Try again with the latest version. – Alex Henrie Nov 03 '22 at 20:48

0 Answers0