question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Create new project via djangocms turns out an error "can not find django-admin.py"

See original GitHub issue

I want to create a new django via command “djangocms -f -p . mysite” according to the tutorial (http://docs.django-cms.org/en/develop/introduction/install.html) and it occures an error.And when I create a new project via “django-admin.py startproject mysite” , it works well.Could you please help me ? error message:

Dependencies installed
Creating the project
/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/django-admin.py': [Errno 2] No such file or directory
Failure occurred. Do you want to cleanup by removing /Users/eleme/Documents/ymy/workspace/env/tutorial-project? [Y/N] 

Following is my step: 1.virtaulenv --no-site-packages env 2.source env/bin/activate 3.pip install django 4.pip install djangocms-installer 5.mkdir tutorial-project 6.cd tutorial-project 7.djangocms -f -p . mysite 8.error

Thanks a lot

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
ghostcommented, Jul 2, 2016

Try following this steps. This works for me.

virtualenv ~/.venvs/project_name
mkdir project_name
cd project_name
ave // activate virtualenv
pip install djangocms-installer
djangocms -f -p . project_name
1reaction
rubengrillcommented, May 3, 2016

Same for me.

virtualenv env
source env/bin/activate
pip install djangocms-installer
djangocms -p . -s -f --verbose example
Creating the project
Project creation command: /usr/local/opt/python/bin/python2.7 /usr/local/opt/python/bin/django-admin.py startproject example .
/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/usr/local/opt/python/bin/django-admin.py': [Errno 2] No such file or directory
The installation failed.

The problem is using the -p . here, with the given settings, env folder is deleted, and thus it is using the system python, not the virtualenv one.

Changing to -p example (djangocms -p example -s -f --verbose example) solved it. Which I don’t like very much, I like to have my folder structure like this:

- project
  |- env
  |- manage.py
  |- project
     |- models.py
Read more comments on GitHub >

github_iconTop Results From Across the Web

Create new project via djangocms turns out an error "can not ...
I want to create a new django via command "djangocms -f -p . mysite" according to the tutorial ...
Read more >
command "django-admin.py startproject mysite" not recognized
Working !! If you are using window then first of all. create virtual environment python -m venv venv. Then activate that environment venv\Scripts\activate....
Read more >
django-admin and manage.py
django-admin is Django's command-line utility for administrative tasks. This document outlines all it can do. In addition, manage.py is automatically created in ...
Read more >
django cms Documentation - Read the Docs
django CMS is a modern web publishing platform built with Django, the web application framework “for perfectionists with deadlines”.
Read more >
django CMS Installer Documentation
djangocms -installer assumes that django-admin.py is installed in the ... By using the -R arguments, djangocms-installer won't create a new ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found