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

Windows 64 bit install needs python-magic-win64 #215

Open
PmasonFF opened this issue Apr 5, 2019 · 1 comment
Open

Windows 64 bit install needs python-magic-win64 #215

PmasonFF opened this issue Apr 5, 2019 · 1 comment

Comments

@PmasonFF
Copy link

PmasonFF commented Apr 5, 2019

Standard install has an explicit requirement 'python-magic>=0.4,<0.5'
64 bit Windows installations requires 'python-magic-win64 in place of this package. This supplies Windows 64 specific dll's which are needed for full functionality of python-magic and a correct libmagic install. Reference https://github.com/axnsan12/python-magic-win64

As a limited workaround, install panoptes-client as described then uninstall python_magic and install python-magic-win64 from
pip install python-magic-win64
Then uninstall python-magic again - this will leave panpotes-client in a functioning condition for all image subject manipulations though I am not sure all libmagic functionality for video and audio files is available. Normally one would leave python-magic installed with python-magic-win64 but this causes issues with panoptes-client which continues to try and use the "normal" python-magic.

A patch would be to require python-magic-win64 and import magic using
from winmagic import magic
This is supposed to work for all platforms but I have not tested it.

Note python-magic-win64 does not yet support the latest version of python-magic 0.4.15

@PmasonFF
Copy link
Author

It looks like libmagic also has Windows 64 bit dll's, and the workaround mentioned above does NOT provide video and audio uploading support (though it does get rid of the warning and works fine for images.)

An alternate I am using now is a 32 bit installation of Python 3.7, install panpotes-client as per the readme, then install python-magic-bin, install libmagic, and uninstall python-magic. That combination seems to work for all image and video files on a Windows 64 bit platform.

Again the requirements,txt lists python-magic as the requirement and subject.py tests for the installation of python-magic if the test for a working libmagic fails - these issues will continue to cause issues for Windows installations of panoptes-client ( and I expect panoptescli).

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

1 participant