-
Notifications
You must be signed in to change notification settings - Fork 23
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
Could not install nagisa with poetry (without complicated configurations) #32
Comments
Hi @himkt! Thank you for providing the report. I will try to conduct a similar verification myself. I haven't been using poetry regularly, so my verification was insufficient. |
Thank you @himkt! I have figured out the cause of the error. The following poetry command retrieves dependency information from poetry add nagisa You can check with this code. import requests
package_name = "nagisa"
url = f"https://pypi.org/pypi/{package_name}/json"
response = requests.get(url)
data = response.json()
dependencies = data.get("info", {}).get("requires_dist", [])
print(dependencies) Also, when adding GitHub or wheel directly in the poetry command, it is possible to execute switch_install_requires directly in that environment, and it correctly specifies DyNet38. poetry add git+https://github.com/taishi-i/nagisa.git As a solution to this problem, it is necessary to correct the following part. def switch_install_requires():
major = sys.version_info.major
minor = sys.version_info.minor
if os.name == 'posix' and major == 3 and minor > 7:
return ['six', 'numpy', 'DyNet38']
else:
return ['six', 'numpy', 'DyNet'] Since it involves handling dependencies, it is necessary to conduct sufficient testing and add a new wheel to PyPI. Therefore, once sufficient testing has been completed, I will release a version addressing this issue, so please wait a little longer. |
Wow, thank you so much for your blazing fast investigation (did you read the codebase of poetry...?). 😮 Just for my curiosity: will you continue to support Python<=3.7 (if the minimum python requirements were updated to py38 simply, |
Hi @himkt! Yes. Just to be sure, I checked the contents of the poetry code! I referred to this part. Currently, to maintain consistency and stability in code processing, this repository is adopting a policy of making only minimal changes. In the future, when significant changes become inevitable, I plan to discontinue the provision of Python libraries that have been deprecated. Regarding the recent error, the issue was that the dependency library information in I resolved the issue where Poetry could not be installed this time by first updating pip, wheel, and build to the latest versions, and then executing An updated wheel has been released (nagisa v0.2.11), and with it, I've managed to use More detailed information about this error will be shared at nagisa v0.2.11 of release. |
Thank you so much for your work and clarification! I understand the policy about dependencies. 👍
Aha, I see. I also succeeded to add |
Sorry for the inconvenience I have caused so far. Also, I haven't had the chance to thank you until now, but thank you for integrating This issue is resolved, so I close it. Thank you! |
Hello @taishi-i, thank you for maintaining nagisa package! Let me report that I think we couldn't install nagisa with poetry.
I'm not sure why but poetry tried to build DyNet even if the manifest explicitly requires Python 3.8+ (in this case, 3.10+).
Currently I have a workaround to specify the repository on GitHub so it's just to share with you. Maybe
switch_install_requires
doesn't work as expected. I'm sorry that currently I'm not sure which poetry or my config is bad.From PyPI
It (might) use sdist.
Full log: https://gist.github.com/himkt/f714d3c6a1f1e21f268a0ba5f4b7ee8b
From GitHub (git repo)
It uses dyNet38 as expected.
The text was updated successfully, but these errors were encountered: