mtprotoproxy icon indicating copy to clipboard operation
mtprotoproxy copied to clipboard

Can I use pypy to run this program?

Open CCCAUCHY opened this issue 4 years ago • 5 comments

CCCAUCHY avatar Apr 25 '22 04:04 CCCAUCHY

Yes, you can

alexbers avatar Apr 25 '22 11:04 alexbers

Yes, you can

I use "apt install pypy" to install pypy, and then use "pypy mtprotoproxy.py" to run, and then it reports many errors

CCCAUCHY avatar Apr 26 '22 03:04 CCCAUCHY

Yes, you can

 pypy mtprotoproxy.py
  File "mtprotoproxy.py", line 359
    print(msg, flush=True, file=sys.stderr)
                    ^
SyntaxError: invalid syntax (expected ')')

CCCAUCHY avatar May 05 '22 08:05 CCCAUCHY

it should be pypy version 3 instead 2

alexbers avatar May 15 '22 09:05 alexbers

it should be pypy version 3 instead 2

I use apt install pypy3 to install pypy3

pypy3 mtprotoproxy.py

Traceback (most recent call last):
  File "mtprotoproxy.py", line 483, in <module>
    myrandom = MyRandom()
  File "mtprotoproxy.py", line 464, in __init__
    self.encryptor = create_aes_ctr(key, iv)
  File "mtprotoproxy.py", line 333, in create_aes_ctr
    cipher = Cipher(algorithms.AES(key), modes.CTR(iv_bytes), default_backend())
  File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/__init__.py", line 14, in default_backend
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/__init__.py", line 6, in <module>
    from cryptography.hazmat.backends.openssl.backend import backend
  File "/usr/lib/python3/dist-packages/cryptography/hazmat/backends/openssl/backend.py", line 114, in <module>
    from cryptography.hazmat.bindings.openssl import binding
  File "/usr/lib/python3/dist-packages/cryptography/hazmat/bindings/openssl/binding.py", line 14, in <module>
    from cryptography.hazmat.bindings._openssl import ffi, lib
ModuleNotFoundError: No module named 'cryptography.hazmat.bindings._openssl'

CCCAUCHY avatar Aug 04 '22 09:08 CCCAUCHY