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

python3 incompatibility #5

Open
wiibrew opened this issue Mar 30, 2018 · 7 comments
Open

python3 incompatibility #5

wiibrew opened this issue Mar 30, 2018 · 7 comments

Comments

@wiibrew
Copy link

wiibrew commented Mar 30, 2018

Hi,

I was using pip3 install pyblur but found cannot import pyblur after the installation.
error is like:
ModuleNotFoundError: No module named 'LineDictionary'

This is due to the different syntax for py2 and py3. To fix this issue, 3 places needs to modified.

  1. in pyblur/LinearMotionBlur.py line 8 change to : from .LineDictionary import LineDictionary
  2. in pyblur/Boxblur.py, change all from xxx import xxx =>from .xxx import xxx
  3. incompatibility in lickle load. change pyblur/PsfBlur.py", line 11:
    psfDictionary = pickle.load(pklfile) to psfDictionary = pickle.load(pklfile, encoding='latin1')

Then it should work.

@randomtutu
Copy link

something also have to be done in py3.6
in pyblur/RandomizedBlur,py change all from xxx import xxx =>from .xxx import xxx

@bravotty
Copy link

thx

@zzhuolun
Copy link

@wiibrew

  1. in pyblur/Boxblur.py, change all from xxx import xxx =>from .xxx import xxx

No need to change BoxBlur.py.
In module BoxBlur.py, only PIL and scipy.signal are imported; they are not part of pyblur.

@misaelbg
Copy link

misaelbg commented Jan 8, 2020

Python 3 implementation: https://github.com/misaelbg/pyblur

@allansdefreitas
Copy link

Python 3 implementation: https://github.com/misaelbg/pyblur

@misaelbg Do you still have this implementation available? It seems that the URL is broken.

Thanks!

@WASasquatch
Copy link

Python 3 implementation: https://github.com/misaelbg/pyblur

Why did you remove this?

@SYSU22214881
Copy link

No need to change BoxBlur.py+1
But in pyblur\RandomizedBlur.py,change all from xxx import xxx =>from .xxx import xxx
BELIKE:
import numpy as np
from .BoxBlur import BoxBlur_random
from .DefocusBlur import DefocusBlur_random
from .GaussianBlur import GaussianBlur_random
from .LinearMotionBlur import LinearMotionBlur_random
from .PsfBlur import PsfBlur_random

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

8 participants