cs50/submit50

Import error.

Opened this issue · 3 comments

Hi. Not sure whether this is appropriate but if I try to run submit50 from the terminal (regardless of what IDE, or what directory) I get the following:

/__init__.py", line 18, in <module>
    CONFIG_LOADER = __import__("lib50").config.Loader("submit50")
  File "/Users/bernardino/opt/anaconda3/lib/python3.7/site-packages/lib50/__init__.py", line 22, in <module>
    from . import config, crypto
  File "/Users/bernardino/opt/anaconda3/lib/python3.7/site-packages/lib50/crypto.py", line 4, in <module>
    from cryptography.hazmat.primitives import serialization, hashes
  File "/Users/bernardino/opt/anaconda3/lib/python3.7/site-packages/cryptography/hazmat/primitives/serialization/__init__.py", line 7, in <module>
    from cryptography.hazmat.primitives.serialization.base import (
  File "/Users/bernardino/opt/anaconda3/lib/python3.7/site-packages/cryptography/hazmat/primitives/serialization/base.py", line 13, in <module>
    from cryptography.hazmat.backends import _get_backend
ImportError: cannot import name '_get_backend' from 'cryptography.hazmat.backends' (/Users/bernardino/opt/anaconda3/lib/python3.7/site-packages/cryptography/hazmat/backends/__init__.py)

Something is borked with your cryptography install (a python package that submit50 depends on indirectly) but googling around seems to indicate that this can be caused by a wide array of issues which makes it difficult to debug.

Can you share the output of pip3 list as well as conda list (since it appears you're using anaconda?)

how to submit my code ?
error