Sorry, missed the updates to this thread. Installing XCode, homebrew, python, and pip is a bit of work for non-tech, but assuming we could simplify that I tried running the install command from https://test.pypi.org/project/mnemosyne/2.10.1a0/ and I got the following error output
``` orpved2:~ devin$ pip3 install -i https://test.pypi.org/simple/ mnemosyne==2.10.1a0 Looking in indexes: https://test.pypi.org/simple/ Collecting mnemosyne==2.10.1a0 Downloading https://test-files.pythonhosted.org/packages/fb/4d/d17f2eaead745b10676d4b5795ff3ac8948b685a4b5d61440213ab95af65/mnemosyne-2.10.1a0.tar.gz (898 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 898.4/898.4 kB 10.2 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [18 lines of output] Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module> main() File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/local/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel return hook(metadata_directory, config_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/s_/kfjzrd0x21502lph7nw_nqk80000gr/T/pip-build-env-t6ye3_dd/overlay/lib/python3.11/site-packages/poetry/core/masonry/api.py", line 40, in prepare_metadata_for_build_wheel poetry = Factory().create_poetry(Path(".").resolve(), with_groups=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/s_/kfjzrd0x21502lph7nw_nqk80000gr/T/pip-build-env-t6ye3_dd/overlay/lib/python3.11/site-packages/poetry/core/factory.py", line 46, in create_poetry local_config = PyProjectTOML(path=poetry_file).poetry_config ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/private/var/folders/s_/kfjzrd0x21502lph7nw_nqk80000gr/T/pip-build-env-t6ye3_dd/overlay/lib/python3.11/site-packages/poetry/core/pyproject/toml.py", line 74, in poetry_config assert isinstance(config, Table) AssertionError [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed × Encountered error while generating package metadata. ╰─> See above for output. note: This is an issue with the package mentioned above, not pip. hint: See above for details. ``` Not sure yet if this is my setup or a generic issue. I don't get the same error with, for example, pip3 install sphinx On Thursday, October 5, 2023 at 11:07:30 AM UTC-7 Peter Bienstman wrote: > Sorry, still getting used to pypi's naming conventions. The latest version > you should use is actually > https://test.pypi.org/project/mnemosyne/2.10.1a0/ , which pypi treats as > a prerelease to what it wrongly considers the latest version 2.10.1. > > Peter > > On Thursday, 5 October 2023 at 19:58:03 UTC+2 Peter Bienstman wrote: > >> Ok, I jumped through a few hoops, made use of an undocumented feature >> of poetry, did some final tweaks, and now it seems to work for me: >> >> https://test.pypi.org/project/mnemosyne/ >> >> Devin, could you try and see if this also works on Mac, and perhaps >> write some Mac-specific instructions so that a non-technical user is >> able to install it that way? >> >> There is one final hurdle, though, and that is that I can't register >> mnemosyne on the actual pypi site, as opposed to the test-pypi site. >> Perhaps somebody already claimed the name? In any case, I've opened a >> request to try and fix this... >> >> Cheers, >> >> Peter >> >> On Thu, Oct 5, 2023 at 3:23 AM Ace Alba <[email protected]> wrote: >> > >> > Also, wheel needs to be installed 'pip install wheel' before running >> 'python3 setup.py bdist_wheel'. >> > >> > On Thursday, October 5, 2023 at 9:19:15 AM UTC+8 Ace Alba wrote: >> >> >> >> This is unfamiliar terrain for me. Poetry cannot access makefile >> commands, but can access python commands, I think. I think you are in the >> right direction; what you did for pyqt_ui, you do for the rest of the build >> commands. Either that or access the make commands from a python script, >> then register that in pyproject.toml. >> >> >> >> As for the wheel generation... well everytime i try something in >> google there's just commenters in github issues duking it on what the >> proper behavior should be. Woe the hellscape that is python's packaging >> ecosystem. >> >> >> >> Anyhow, from this github issue, >> https://github.com/pypa/wheel/issues/276... here is a possible solution: >> >> Python3 setup.py bdist_wheel. >> >> >> >> Other than that i haven't found a way yet to generate the wheel >> directly from an sdist. I'll update if I ever find something. >> >> On Thursday, October 5, 2023 at 1:17:39 AM UTC+8 Peter Bienstman >> wrote: >> >>> >> >>> 'python3 setup.py sdist' just creates the source, not a wheel. >> Anyway, >> >>> I made some progress by adding a section [tool.poetry.scripts] to >> >>> pyproject.toml and doing some other minor changes. Now an executable >> >>> is added to the Scripts directory which starts to run Mnemosyne. >> >>> However, where it currently fails is that the new poetry >> >>> infrastructure does not know that it should build the dependencies >> >>> (build, build-po in the makefile)... >> >>> >> >>> Ace, any idea how best to do this? >> >>> >> >>> Thanks! >> >>> >> >>> Peter >> >>> >> >>> On Wed, Oct 4, 2023 at 12:44 PM Ace Alba <[email protected]> >> wrote: >> >>> > >> >>> > When building the dists, we might need to use >> >>> > >> >>> > python3 setup.py sdist >> >>> > >> >>> > Instead of Python3 -m build... ? >> >>> > >> >>> > Then reupload the packages to testpypi. >> >>> > On Wednesday, October 4, 2023 at 6:18:45 PM UTC+8 Peter Bienstman >> wrote: >> >>> >> >> >>> >> Excellent detective work, thanks a lot! >> >>> >> >> >>> >> I've tried the second option in a virtual environment, and it >> seems to >> >>> >> install everything just fine, apart from the main script to start >> >>> >> Mnemosye... In setup.py the location of this script is mentioned, >> but >> >>> >> perhaps there's something in the new poetry infrastructure that >> needs >> >>> >> to change in order to accomodate this as well? (I've very little >> >>> >> experience with poetry) >> >>> >> >> >>> >> Cheers, >> >>> >> >> >>> >> Peter >> >>> >> >> >>> >> On Wed, Oct 4, 2023 at 11:52 AM Ace Alba <[email protected]> >> wrote: >> >>> >> > >> >>> >> > Edit: Here's the solution for option two, which is much simpler. >> Use this command instead. >> >>> >> > >> >>> >> > pip install --index-url https://test.pypi.org/simple/ >> --extra-index-url https://pypi.org/simple/ mnemosyne==2.10.1 >> >>> >> > >> >>> >> > This command allows pip to use pypi as an alternative repo in >> resolving the dependencies. works on my end. >> >>> >> > On Wednesday, October 4, 2023 at 5:45:14 PM UTC+8 Ace Alba >> wrote: >> >>> >> >> >> >>> >> >> Here's our blocker. It's no one's fault but the nature of how >> pip resolves dependencies. See >> >>> >> >> >> >>> >> >> >> https://stackoverflow.com/questions/49900875/pip-install-fails-to-install-dependencies >> >> >>> >> >> >> >>> >> >> With the following paragraph: >> >>> >> >> >> >>> >> >> When installing a package from testPyPI, the dependencies are >> also installed from there. And it seems, that while there are many packages >> available, pytables and progress are apparently missing. This caused the >> installation to fail. >> >>> >> >> >> >>> >> >> So though we followed the instructions to the letter, we cannot >> proceed because testpypi will always get the packages from testpypi >> repository (which does not have the dependencies), not from pypi (where the >> dependencies are actually located). So installing our test package from >> testpypi will always cause it to break. >> >>> >> >> >> >>> >> >> We have two options: >> >>> >> >> 1. A test deploy from pypi itself. >> >>> >> >> >> >>> >> >> because the commands listed rely on pyproject.toml, all you >> need is to: >> >>> >> >> - rename the package name in pyproject.toml (i.e. >> mnemosyne-test or another name) >> >>> >> >> - clear out everything from the dist/ folder >> >>> >> >> - go do the same process again in the article (register a pypi >> account, python3 -m build, etc.,) up until.. >> >>> >> >> - when uploading the distributions, use `twine upload --verbose >> --repository pypi dist/*` instead of `testpypi` >> >>> >> >> - download the package using the pip install command >> >>> >> >> - if the package is successfully installed, i guess it is >> successful. so the test package can be deleted from pypi. >> >>> >> >> - then restore back the proper package name in pyproject.toml. >> purge all contest of dist/*, then do everything all over again. >> >>> >> >> >> >>> >> >> 2. figure out a way for pip to resolve the dependency tree from >> pypi instead of testpypi. I don't know how to do this. >> >>> >> > >> >>> >> > -- >> >>> >> > You received this message because you are subscribed to the >> Google Groups "mnemosyne-proj-users" group. >> >>> >> > To unsubscribe from this group and stop receiving emails from >> it, send an email to [email protected]. >> >>> >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/mnemosyne-proj-users/a478ec86-5a17-4215-920e-d41208eaf735n%40googlegroups.com. >> >> >> >>> > >> >>> > -- >> >>> > You received this message because you are subscribed to the Google >> Groups "mnemosyne-proj-users" group. >> >>> > To unsubscribe from this group and stop receiving emails from it, >> send an email to [email protected]. >> >>> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/mnemosyne-proj-users/bb174636-3457-420b-b9e2-f6dd8b47e8bdn%40googlegroups.com. >> >> >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups "mnemosyne-proj-users" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an email to [email protected]. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/mnemosyne-proj-users/d32aa821-9d3b-4353-87ee-b9b8a8343babn%40googlegroups.com. >> >> >> > -- You received this message because you are subscribed to the Google Groups "mnemosyne-proj-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/mnemosyne-proj-users/2a031ccd-786d-4ec1-8268-404512110805n%40googlegroups.com.
