Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Errors installing and ImportError while initializing on Python 3 #125

Closed
GoogleCodeExporter opened this issue Mar 7, 2015 · 28 comments
Closed

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Install the package on Python 3. It will install, but with errors.
2. Attempt to import 'keyczar.keyczar'. This also raises an error.

What is the expected output? What do you see instead?

The package should install nicely and run on Python 3. These errors are seen 
during install:

Running python-keyczar-0.71b\setup.py -q bdist_egg --dist-dir 
c:\users\jaraco\appdata\local\temp\easy_install-moe2i9\python-keyczar-0.71b\egg-
dist-tmp-2lfd9s
  File "build\bdist.win-amd64\egg\keyczar\keyczart.py", line 169
    print "Generating private key sets..."
                                         ^
SyntaxError: invalid syntax

  File "build\bdist.win-amd64\egg\keyczar\util.py", line 800
    except UnicodeDecodeError, exc:
                             ^
SyntaxError: invalid syntax

zip_safe flag not set; analyzing archive contents...
  File "c:\users\jaraco\projects\public\keyring\env\python33\site-packages\python_keyczar-0.71b-py3.3.egg\keyczar\keyczart.py", line 169
    print "Generating private key sets..."
                                         ^
SyntaxError: invalid syntax

  File "c:\users\jaraco\projects\public\keyring\env\python33\site-packages\python_keyczar-0.71b-py3.3.egg\keyczar\util.py", line 800
    except UnicodeDecodeError, exc:
                             ^
SyntaxError: invalid syntax

Adding python-keyczar 0.71b to easy-install.pth file
Installing keyczart-script.py script to 
C:\Users\jaraco\projects\public\keyring\env/Scripts
Installing keyczart.exe script to 
C:\Users\jaraco\projects\public\keyring\env/Scripts


And this is the error occurs during initial import:

>>> import keyczar.keyczar
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\jaraco\projects\public\keyring\env\Python33\site-packages\python_keyczar-0.71b-py3.3.egg\keyczar\keyczar.py", line 27, in <module>
    import errors
ImportError: No module named 'errors'


What version of the product are you using? On what operating system?

0.71b on Python 3.3 64-bit on Windows 8.


Original issue reported on code.google.com by jaraco@jaraco.com on 7 Feb 2013 at 10:47

@dylansturg
Copy link

Are there any updates regarding supporting Python 3.0+? I'd like to use Keyczar in a Python 3 project. Thanks for any information.

@devinlundberg
Copy link
Contributor

Unfortunately there are no updates. Jay did a lot of work here https://github.com/jbtule/keyczar-python2to3

Its a gigantic PR that was difficult to break down so we weren't able to finish reviewing it at the time. All of the changes he made make sense from a high level.

@jbtule if you can submit it through a github PR I could start working on the code review.

@jbtule
Copy link
Contributor

jbtule commented Apr 16, 2015

added the pull request, #164 it's two years old, don't have time to make a better one.

@jamiegau
Copy link

Its nearly december. We are 99% there.. Please roll out into global release..
Python 3 has been around for decades in computer time... And I keep bumping into lack of 2 to 3 upgrades..

With security being an ever more important issues on the internet.. I find the complacency here astounding.

@dmyerscough
Copy link

Any updates on when keyczar will be GA for Python 3?

@rsyring
Copy link

rsyring commented Feb 17, 2016

Python 3 adoption is really taking off. Maybe Priority-Low isn't so true anymore?

@nickbaum
Copy link

For what it's worth, Keyczar is the only Python library we use that still isn't compatible with Python 3.

This seems like it would be a great 20% project for someone on the Google Security team :)

@jbtule
Copy link
Contributor

jbtule commented Mar 30, 2016

Less than 20% when all is needed is just auditing and merging a 3 year old pull request.

Sent from my iPhone

On Mar 30, 2016, at 12:45 PM, Nick Baum notifications@github.com wrote:

For what it's worth, Keyczar is the only Python library we use that still isn't compatible with Python 3.

This seems like it would be a great 20% project for someone on the Google Security team :)


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub

@nickbaum
Copy link

I suspect a 3 year old pull request would be non-trivial to review, but I'm in no position to judge.

@hsdhillon
Copy link

+1 for this request. Any ETA as when Python 3 support will be available??

@questin
Copy link

questin commented May 6, 2016

+1 for this request also. Latest Ubuntu LTS ships with Python 3 now as default. This is the last library our platform need to run on 3. Thanks.

@soferio
Copy link

soferio commented May 20, 2016

+1.

@soferio
Copy link

soferio commented May 20, 2016

Is this the answer? : https://pypi.python.org/pypi/python3-keyczar/0.71rc0

@pembo13
Copy link

pembo13 commented Feb 9, 2018

It's 2018... is there a solution to this?

@nickbaum
Copy link

@edknapp posted some updates in this issue.

#213

TL;DR is that work is happening but don't expect something soon

@dennismwagiru
Copy link

Yes soferio, use https://pypi.python.org/pypi/python3-keyczar/0.71rc0
pip install python3-keyczar

@pembo13
Copy link

pembo13 commented Apr 29, 2018

@dennismwagiru as of right now python3-keyczar depends on pycrypto, which I can't get to build on Centos7 with Python36. Pycrpto itself is dead.

@dennismwagiru
Copy link

@pembo13, first install pycryptodome and the rename the pycrptodome folder to pycrypto before installing python3-keyczar

@dennismwagiru
Copy link

@frispete
Copy link

@dennismwagiru

first install pycryptodome and the rename the pycrptodome folder to pycrypto

Please note, PyCryptodome is meant as a drop-in replacement of PyCrypto (with absolutely inevitable incompatibilities only). If a rename is necessary, that would be a bug in one of the involved packages.

@jonathan-chao-artivest
Copy link

what is the correct import?

from keyczar import keyczar

returns import error still, even for python3-keyzcar

Is it a different import package?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests