jithurjacob / Windows-10-Toast-Notifications

Python library to display Windows 10 Toast Notifications
MIT License
971 stars 168 forks source link

Cannot install this module on python 3.12.0a2 #114

Closed Steven7559 closed 1 year ago

Steven7559 commented 1 year ago

l can't install this module on python 3.12.0a2,pip says that "SyntaxError" appears in a certain line of code — a set of parentheses is missing after the “print” .I want to find the program that is faulty, but my operating system tells me that the directory does not exist. I put the error code into a text document, please take a look. Link: 1.txt

MauBorre commented 1 year ago

Hi, I'm trying to workout a solution for this issue.

First of all, I couldn't properly re-build the module into its .whl file without having to fix 2 things beforehand:

1 - parse_requirements import module was outdated, the current pip version (23.0.1) is structured differently and the code needed to grab parse_requirements from another directory.

2 - ParsedRequirement class doesn't have an attribute 'req', it might have had it in the past, but now seems to be updated to 'requirement', so attrgetter input had to be fixed.

will do a pull request for this two problems, but still, the issue you are facing seems to reside somewhere in the building scripts of Python 3.12, as the temporal setup.py made when building the project is full of SyntaxError's, but the same "fixed" .whl version I made builds without problems on Python 3.11

MauBorre commented 1 year ago

Hi, the problem is that pip can't retrieve the correspondent version of the required module 'Pywin32'. This is due it's package administrators need to upload their package (wich has already been updated with Python 3.12 support) to have the correspondent wheel tags for pip to match the compatibility with Python 3.12.

The good thing is that you can manually fix the tags and pip will be able to install Pywin32, which will then let you install win10toast without problems. To do so you only need to change the Pywin32 .whl file name as follows in this example:

Python 3.10 Pywin32 wheel tag: pywin32-305-cp310-cp310-win_arm64.whl Python 3.12 Pywin32 wheel tag: pywin32-305-cp312-cp312-win_arm64.whl

It will work for any platform you are using, just change the tag cp and pip will be able to match the environment compatibility.

after that just run pip install win10toast

Hope this helps!

Steven7559 commented 1 year ago

thanks