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

imporing theano.compat.six fails #1591

Open
koenhelwegen opened this issue Aug 27, 2018 · 3 comments
Open

imporing theano.compat.six fails #1591

koenhelwegen opened this issue Aug 27, 2018 · 3 comments

Comments

@koenhelwegen
Copy link

koenhelwegen commented Aug 27, 2018

According to this issue, import statements with theano.compat.six should be replaced by import six (or from six import ...). Replacing all import statements appears to have solved the issue.

@nouiz
Copy link
Member

nouiz commented Aug 27, 2018

exact. But there isn't any maintainer of this repo. If someone make a PR, maybe I'll review it, but this isn't even sure.

@mathemaphysics
Copy link

I would love to see this work. has anyone set up a pull request yet?

@mathemaphysics
Copy link

I ran two bash lines which took care of it. So far at least...

files="$(egrep -r 'theano\.compat\.six' ./*)"
found="$(for x in ${files}; do echo $(sed -nre 's/([-\_a-zA-Z0-9]+\.py)(.*)/\1/gp' <<<"${x}"); done | uniq)"
for xx in ${found}; do sed -i -re 's/theano\.compat\.six/six/g' ${xx}; done

and then finally

files="$(egrep -r 'from theano\.compat import six' ./*)"
found="$(for x in ${files}; do echo $(sed -nre 's/([-\_a-zA-Z0-9]+\.py)(.*)/\1/gp' <<<"${x}"); done | uniq)"
for xx in ${found}; do sed -i -re 's/from theano\.compat import six/import six/g' ${xx}; done

This appears to deal with all of the issues making trouble for six versus theano.compat.six.

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