Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django: running manage.py always aborts

Tags:

python

django

I have an existing Django application that I'm trying to set up locally. After creating a virtual environment and installing all the required dependencies, running manage.py just aborts without any other useful error message.

(venv) $ python manage.py
[1]    39973 abort      python manage.py

Any subcommands supplied also just aborts and I've been trying to find a way to debug with no luck.

Versions used:

python 3.6.8
Django 2.0.2

EDIT:

I finally figured out the problem. If you are on macOS 10.15 (Catalina) this may help you:

One of the dependencies is cryptography which requires openssl. You can install openssl via brew then add symbolic links to the following:

cd /usr/local/lib
ln -s /usr/local/Cellar/openssl/1.0.2t/lib/libcrypto.1.0.0.dylib libcrypto.dylib
ln -s /usr/local/Cellar/openssl/1.0.2t/lib/libssl.1.0.0.dylib libssl.dylib
like image 739
Marlon Marcos Avatar asked Nov 09 '19 01:11

Marlon Marcos


People also ask

Why does Python manage py Runserver not work?

The site could be temporarily unavailable or too busy. Try again in a few moments. If you are unable to load any pages, check your computer's network connection. If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

What happens when we run Python manage py Runserver?

1) python manage.py runserver It means to run a emulated server on your local computer. So, after running it, you can go to localhost:8000 or 127.0.

How do you stop a Runserver in Django?

You can Quit the server by hitting CTRL-BREAK.


2 Answers

Looks like its an issue with asn1crypto package..

running the below command should fix the issue

rm -rf venv/lib/python2.7/site-packages/asn1crypto
like image 100
Sharan Avatar answered Sep 22 '22 13:09

Sharan


I had similar problem. It is because python3.6.8 and macOS catalina are incompatible. If you upgrade python version at least 3.8, it will work.

https://docs.python.org/3.8/whatsnew/changelog.html?highlight=catalina

like image 20
jms0707 Avatar answered Sep 22 '22 13:09

jms0707