我已经看过关于这个主题的所有主题,而且大多数已经过时或对我不起作用。
我在Linux version 4.4.0-21-generic (buildd@lgw01-21) (gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2) )
我正在使用python3.5
我已经安装了django(我可以从django进行一些导入)
我不知道为什么,但当我尝试python3 manage.py runserver
时
错误回溯告诉我没有名为_ssl
的模块
我整个周末都试图解决这个问题,但无法解决它。
File "/home/zouz/Desktop/django_project/smart-prospective-site/app/urls.py", line 4, in <module>
from . import views
File "/home/zouz/Desktop/django_project/smart-prospective-site/app/views.py", line 14, in <module>
from .data import *
File "/home/zouz/Desktop/django_project/smart-prospective-site/app/data.py", line 4, in <module>
import requests
File "/home/zouz/.local/lib/python3.5/site-packages/requests/__init__.py", line 59, in <module>
from .models import Request, Response, PreparedRequest
File "/home/zouz/.local/lib/python3.5/site-packages/requests/models.py", line 19, in <module>
from .packages.urllib3.fields import RequestField
File "/home/zouz/.local/lib/python3.5/site-packages/requests/packages/urllib3/__init__.py", line 10, in <module>
from .connectionpool import (
File "/home/zouz/.local/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 31, in <module>
from .connection import (
File "/home/zouz/.local/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 45, in <module>
from .util.ssl_ import (
File "/home/zouz/.local/lib/python3.5/site-packages/requests/packages/urllib3/util/__init__.py", line 5, in <module>
from .ssl_ import (
File "/home/zouz/.local/lib/python3.5/site-packages/requests/packages/urllib3/util/ssl_.py", line 12, in <module>
import ssl
File "/usr/local/lib/python3.5/ssl.py", line 98, in <module>
import _ssl # if we can't import it, let the error propagate
ImportError:没有名为'_ssl'的模块
非常感谢您的帮助 抱歉我的英语不是很好