dthpham / sminterpolate

Make motion interpolated and fluid slow motion videos from the command line.
MIT License
1.38k stars 91 forks source link

Reference to _winreg on macOS #116

Closed brodyhoskins closed 4 years ago

brodyhoskins commented 5 years ago

butterflow fails to run on macOS due to a reference to _winreg (which appears to be Windows-specific):

Traceback (most recent call last):
  File "/usr/local/bin/butterflow", line 11, in <module>
    load_entry_point('butterflow==0.2.4a4', 'console_scripts', 'butterflow')()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2843, in load_entry_point
    return ep.load()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2434, in load
    return self.resolve()
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2440, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "build/bdist.macosx-10.14-x86_64/egg/butterflow/__init__.py", line 6, in <module>
ImportError: No module named _winreg
ascendant512 commented 5 years ago

Had a horrific build experience on Gentoo (which is predisposed to making this easy to build on Linux), but was able to solve this particular with cp -a ./butterflow/version.py ./butterflow/__init__.py github says that's basically how it was before they added the windows stuff to it, but I'm also fairly sure it would work if the file was blank.

jeremiegarrigues commented 5 years ago

Unfortunately I have the same problem on Ubuntu 16.04, and the solution of @ascendant512 didn't work for me.

zumpchke commented 5 years ago

Same. @alfraises What are you using for slowmotion instead?

ascendant512 commented 5 years ago

OP's error is in butterflow/__init__.py You two can't have the same error as him or me, because once butterflow/__init__.py is emptied (there is no need to copy version to init, just clear the whole file) it is impossible for it to contain any references to winreg. You should probably open a different bug and post your actual error. I tried downloading from git again and followed my own instructions in https://github.com/dthpham/butterflow/issues/69#issuecomment-538602164 and the build process still works, and results in a functional bin/butterflow.

GodloveD commented 4 years ago

fwiw, it looks like you can checkout the last (I assume stable?) release to get around this error on Ubuntu 16. Guess it will probably work on Mac too.

$ cd butterflow && git checkout 0.2.3
brodyhoskins commented 4 years ago

Hello, I believe the issue is now closed — I'm having an issue now with butterflow finding opencv2, but believe it's related to paths and not this issue. Thanks!

jbhanks commented 3 years ago

I cleared out butterflw/__init__.py (and also tried git checkout 0.2.3) and I still get references to winreg. What is strange is that this error is said to be coming from a file that does not exist.

✗ butterflow -h   
Traceback (most recent call last):
  File "/usr/bin/butterflow", line 11, in <module>
    load_entry_point('butterflow==0.2.4a4', 'console_scripts', 'butterflow')()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 489, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2852, in load_entry_point
    return ep.load()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2443, in load
    return self.resolve()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2449, in resolve
    module = __import__(self.module_name, fromlist=['__name__'], level=0)
  File "build/bdist.linux-x86_64/egg/butterflow/__init__.py", line 6, in <module>
ImportError: No module named _winreg
cat build/bdist.linux-x86_64/egg/butterflow/__init__.py
cat: build/bdist.linux-x86_64/egg/butterflow/__init__.py: No such file or directory
ls -a build/bdist.linux-x86_64/
.  ..