0

I am starting to learn to use MongoDB with Django, so I followed this tutorial to start up.

I created my virtual environment using python3.6 -m venv MongodbTestVenv, and activated it using source MongodbTestVenv/bin/activate. Everything worked fine, so far.

I installed Django-nonrel using pip install git+https://github.com/django-nonrel/django@nonrel-1.5.

I installed djangotoolbox using pip install git+https://github.com/django-nonrel/djangotoolbox.

I installed Mongo DB engine using pip install git+https://github.com/django-nonrel/mongodb-engine.

I checked with pip list to ensure everything is installed:

(MongodbTestVenv) MacBook-Pro-de-Hugo:MongodbTestProject hugovillalobos$ pip list
Package               Version
--------------------- -------
Django                1.5.11 
django-mongodb-engine 0.6.0  
djangorestframework   3.9.2  
djangotoolbox         1.8.0  
pip                   19.0.3 
pymongo               3.7.2  
setuptools            28.8.0 

But, when I type django-admin startproject MongodbTest, I get this error: -bash: django-admin: command not found.

I checked this question, but all answer are related to the location of django-admin.py file, so I found it using which django-admin.py, and this is the result:

(MongodbTestVenv) MacBook-Pro-de-Hugo:MongodbTestProject hugovillalobos$ which django-admin.py
/Users/hugovillalobos/Documents/Code/MongodbTestProject/MongodbTestVenv/bin/django-admin.py

I can see that the file is located on the active virtual environment directory, so I can't understand why it can't be located.

I don't know what I am missing, I have never had problems with Django when using relational database and I install regular Django versions using just pip install Django.

HuLu ViCa
  • 5,077
  • 10
  • 43
  • 93
  • 1
    Because the file is called `django-admin.py`, not `django-admin`. But *all* of these projects are hopelessly out of date and unsupported. You shouldn't be using them. I doubt any of them will even work with Python 3.6. If you want to use MongoDB with Django, have a look at Djongo. – Daniel Roseman Mar 07 '19 at 16:41
  • Thanks a lot @Daniel Roseman. I checked Djongo and it was as natural to Django as any other I tried before – HuLu ViCa Mar 07 '19 at 17:08

1 Answers1

0

You say you ran:

django-admin startproject MongodbTest

but your bash is able to find django-admin.py from that which statement.

Try what your bash knows:

django-admin.py startproject MongodbTest
grafuls
  • 311
  • 5
  • 8