如何解决Django中的“中止”问题?

时间:2019-11-24 11:14:54

标签: python django

我正在Django中做一个项目。我已经安装了python 3.7.5和Django 1.11。当我尝试运行命令

  

python manage.py migration

我得到

  

1中止python manage.py migration

发生了同样的事情
  

python manage.py runserver

在过去的两天里,我一直在集思广益,以解决这个问题,但是没有运气。有人可以帮我解决这个问题吗?

Screenshot of the issue

2 个答案:

答案 0 :(得分:2)

我终于得到了这个问题的答案。令人沮丧的是,新版本的MAC OS Catalina(10.15)仅存在此问题。问题与需要openssl的密码学有关。要解决这些问题,请按照以下步骤操作:

  1. 运行brew install openssl
  2. cd / usr / local / lib
  3. 搜索名称类似于libcrypto.dylib的文件。路径将是这样-
    对于openssl版本1.0.0,路径为 /usr/local/Cellar/openssl/1.0.2t/lib/libcrypto.1.0.0.dylib

,对于openssl 1.1.1,路径为-

/usr/local/Cellar/openssl@1.1/1.1.1d/lib/libcrypto.1.1.dylib

以及libssl.dylib的搜索路径。

然后运行

  

ln -s /usr/local/Cellar/openssl@1.1/1.1.1d/lib/libcrypto.1.1.dylib   libcrypto.dylib

     

ln -s /usr/local/Cellar/openssl@1.1/1.1.1d/lib/libssl.1.1.dylib   libssl.dylib

答案 1 :(得分:0)

对于 openssl 版本:1.1.1k 对我有用的是:

 1. cd /usr/local/lib
 2. ln -s /usr/local/Cellar/openssl@1.1/1.1.1k/lib/libcrypto.1.1.dylib libcrypto.dylib
 3. ln -s /usr/local/Cellar/openssl@1.1/1.1.1k/lib/libssl.1.1.dylib libssl.dylib