Skip to content

Conversation

@caos21
Copy link

@caos21 caos21 commented Sep 4, 2020

Force reinstallation of python2 rsa

The problem:

vagrant@vagrant:~$ python -c "import rsa; print rsa.__version__"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/rsa/__init__.py", line 24, in <module>
    from rsa.key import newkeys, PrivateKey, PublicKey
  File "/usr/local/lib/python2.7/dist-packages/rsa/key.py", line 1
SyntaxError: Non-ASCII character '\xc3' in file /usr/local/lib/python2.7/dist-packages/rsa/key.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

This problem also arises when running views.py from course APIs - ud388

I tried: apt upgrade, restart, and finally pip2 install --upgrade rsa unsuccessfully.

The solution is to force the reinstallation of python2 rsa module.
I propose to perform it in the Vagrantfile in this PR.

Forces reinstallation of python2 rsa
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

Successfully merging this pull request may close these issues.

1 participant