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

Installing ezc3d on python 3.11 fails #345

Closed
Dominikk85 opened this issue Oct 18, 2024 · 18 comments
Closed

Installing ezc3d on python 3.11 fails #345

Dominikk85 opened this issue Oct 18, 2024 · 18 comments

Comments

@Dominikk85
Copy link

When I'm doing pip install ezc3d in the command it will fail and give me the notion "could not find a version that satisfies the requirement ezc3d. do I need an older python version or is there a way?

@pariterre
Copy link
Member

Hi there, pip install cannot work at the moment as you must compile ezc3d using CMake. That said, the #343 is ongoing for solving this long time problem. I won't be able to fix this for the next two weeks or so, but I'll do it ASAP.

In the meantime, you can install ezc3d using conda :)

@Dominikk85
Copy link
Author

thank you. so in the future it will be available with the pip installing? I guess I'm waiting then because I'm using jupyter on vs code and I don't want to change my environment. thanks for your help

@pariterre
Copy link
Member

Hi there, yep, it should work pretty soon, but I'd say not in an horizon of less that 2 to 3 weeks as I have major ongoing project that I cannot delay.
Hopefully this is acceptable for you!

@Dominikk85
Copy link
Author

Thank you no problem, I can wait another month before I start my project, I want to use it for a baseball biomechanics project that I'm doing for fun.

Dominik

@pariterre
Copy link
Member

Hi @Dominikk85

As stated in #343, as of today, ezc3d can be installed using pip :)

@Dominikk85
Copy link
Author

thank you for your contribution. unfortunately I tried again today and failed.

got this error message:
C:\Users\dominik.keul>
C:\Users\dominik.keul>pip install ezc3d
Collecting ezc3d
Using cached ezc3d-1.5.15.tar.gz (50 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [18 lines of output]
Traceback (most recent call last):
File "C:\Users\dominik.keul\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\dominik.keul\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dominik.keul\AppData\Local\Programs\Python\Python311\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dominik.keul\AppData\Local\Temp\pip-build-env-vxaf_snd\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\dominik.keul\AppData\Local\Temp\pip-build-env-vxaf_snd\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
self.run_setup()
File "C:\Users\dominik.keul\AppData\Local\Temp\pip-build-env-vxaf_snd\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
exec(code, locals())
File "", line 14, in
FileNotFoundError: [Errno 2] No such file or directory: 'C:\Users\dominik.keul\AppData\Local\Temp\pip-install-oh7i_85s\ezc3d_a07cc1e6762d4dc1af205781da3eafca/CMakeLists.txt'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

C:\Users\dominik.keul>
C:\Users\dominik.keul>

any idea what that is?

regards,
Dominik

@bernikr
Copy link

bernikr commented Nov 25, 2024

I have the same issue, it looks like the source distribution on pypi is incomplete

edit: just saw that the MANIFEST.in excludes the C sources and some other stuff. However, everything that is needed to run pip install . has to be included for the source distribution to work

@Dominikk85
Copy link
Author

Is that something I can fix, or do I need to wait until it is fixed?

@bernikr
Copy link

bernikr commented Nov 25, 2024

@Dominikk85 you can try installing it with pip install git+https://github.com/pyomeca/ezc3d.git as a workaround, but for pip install ezc3d to work the manifest has to be fixed in this repo

@pariterre
Copy link
Member

@Dominikk85

Wow, you guys went fast! haha! I could not try on Windows yet (I was planning to test this today). I does work for sure on Linux, but I may (and probably need) to change a few things in the Manifest for Windows. I'll keep you posted (sorry I should have specified that it was only tested on Linux!

@bernikr
Copy link

bernikr commented Nov 25, 2024

@pariterre compiling works on windows, the problem is that not every platform/python combination is prebuilt as a wheel, so pip tries to compilie the source distribution which is missing the source code.
Also I would recomend using cibuildwheel on windows and macos as well to cover all python versions, but fixing the source distribution should be the priority as this is the fallback if no compatible wheel is found.

i recently did the compilation workflow for another project, maybe that might be helpful for you: https://github.com/bernikr/gdtw/blob/main/.github/workflows/build_and_publish.yml

@pariterre
Copy link
Member

Thanks for these insightful thoughts! I was actually about to remove the source file in PyPI, but I understand that it is needed. I'll make sure the correct files are included in the source file

Also, is there anything particular I should know with cibuildwheel on windows and mac, or it is just a matter of reusing the exact code from Linux?

@bernikr
Copy link

bernikr commented Nov 25, 2024

it should work the same way as on linux, you just have to make sure to add an action for the source distribution build since that is currently done in your windows and macos build, but not handled by cibuildwheel. (see the action i've linked for an example)

@pariterre
Copy link
Member

Should be good, can you confirm?

@Dominikk85
Copy link
Author

Dominikk85 commented Nov 26, 2024

Should be good, can you confirm?

yes, it actually worked for me. Thanks a lot for your contribution to python and your help.

Dom

@bernikr
Copy link

bernikr commented Nov 26, 2024

@pariterre works for me as well

could I kindly ask you to look into publishing pyomeca on pypi as well? that would finally enable me to get rid of conda, of which im not really a fan 😅

i opend an issue there as well: pyomeca/pyomeca#140

@pariterre
Copy link
Member

@bernikr I can have a look, but as opposed to ezc3d and the bio-(rbd, viz, tim) suite, I was not really a maintainer for pyomeca... When my colleague rewrote pyomeca to make it a subclass of pandas, I was not involved at all... It took me about 25 hours to port ezc3d to PyPI and I know I cannot afford that on pyomeca. So I'll have a look in a few days, but I cannot garanty that it will be done :(

@bernikr
Copy link

bernikr commented Nov 26, 2024

I can try to make a pull request, since it is a pure python package it should be fairly easy as there is nothing to compile, etc.

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