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

Cannot import module on Python 3 (but compiling works fine) #34

Open
wbolster opened this issue Nov 9, 2015 · 6 comments
Open

Cannot import module on Python 3 (but compiling works fine) #34

wbolster opened this issue Nov 9, 2015 · 6 comments

Comments

@wbolster
Copy link

wbolster commented Nov 9, 2015

I can't get this to work on python 3.4 (osx):

Traceback (most recent call last):
  File "url.py", line 3, in <module>
    import re2 as re
  File "re2.pyx", line 1, in init re2 (src/re2.cpp:13681)
NameError: basestring
@NomAnor
Copy link

NomAnor commented Dec 2, 2015

Same problem here with Linux Mint 17 and Python 3.4.3

@yabaoya
Copy link

yabaoya commented Apr 17, 2016

@wbolster how can you solve this problem ?

@wbolster
Copy link
Author

the module isn't ported to python 3 at all, so you cannot easily work around this.

@andreasvc
Copy link
Collaborator

Have a look at my fork: https://github.com/andreasvc/pyre2
I made a lot of improvements, including Python 3 compatibility.

@VitoVan
Copy link

VitoVan commented Jun 29, 2016

@andreasvc Thanks, you have done a great job!

@leewz
Copy link

leewz commented Feb 4, 2018

Quick and very dirty fix:

>>> __builtins__.basestring = str
>>> import re2
>>>

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

6 participants