django error in python No such file or directory - TagMerge
4django error in python No such file or directorydjango error in python No such file or directory

django error in python No such file or directory

Asked 1 years ago
1
4 answers

you need to cd into pyshop and then run the command. thats where manege.py should be

Source: link

1

Because you create a project folder inside your py_website_django folder. manage.py will be inside pyshop folder not in py_website_django.

I suggest you to create your project like this:

django-admin startproject pyshop .

adding a dot at the end will create the project inside the current directory, also, manage.py will be inside your current directory.

Source: link

1

Just do :

cd pyshop

Then do

python manage.py runserver

Source: link

0

Tried different approaches to solve this issue but unsuccessfully.
Organic:/ organic$ sudo pip install --upgrade setuptools
Password:***
The directory '/Users/organic/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/organic/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already up-to-date: setuptools in /Library/Python/2.7/site-packages (40.2.0)
Organic:/ organic$ sudo pip install --upgrade setuptools Password:*** The directory '/Users/organic/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. The directory '/Users/organic/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag. Requirement already up-to-date: setuptools in /Library/Python/2.7/site-packages (40.2.0)
Organic:~ organic$ sudo python setup.py
(null): can't open file 'setup.py': [Errno 2] No such file or directory
I've installed that app.
Organic-2:~ organic$ brew install fail2ban
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core, homebrew/cask).
==> New Formulae
golang-migrate
==> Updated Formulae
citus                                              openrtsp

==> Downloading https://homebrew.bintray.com/bottles/fail2ban-0.10.3.1.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/91/91a2bf679c865a054a60cc9b980b1c5649649686d7e99a95b
######################################################################## 100.0%
==> Pouring fail2ban-0.10.3.1.mojave.bottle.tar.gz
==> Caveats
Before using Fail2Ban for the first time you should edit the jail
configuration and enable the jails that you want to use, for instance
ssh-ipfw. Also, make sure that they point to the correct configuration
path. I.e. on Mountain Lion the sshd logfile should point to
/var/log/system.log.

  * /usr/local/etc/fail2ban/jail.conf

The Fail2Ban wiki has two pages with instructions for macOS Server that
describes how to set up the Jails for the standard macOS Server
services for the respective releases.

  10.4: https://www.fail2ban.org/wiki/index.php/HOWTO_Mac_OS_X_Server_(10.4)
  10.5: https://www.fail2ban.org/wiki/index.php/HOWTO_Mac_OS_X_Server_(10.5)

Please do not forget to update your configuration files.
They are in /usr/local/etc/fail2ban.

To have launchd start fail2ban now and restart at startup:
  sudo brew services start fail2ban
==> Summary
🍺  /usr/local/Cellar/fail2ban/0.10.3.1: 497 files, 3.2MB
I could've run it and stop successfully.
Organic-2:~ organic$ sudo brew services start fail2ban
Service `fail2ban` already started, use `brew services restart fail2ban` to restart.
Organic-2:~ organic$ sudo brew services start fail2ban Service `fail2ban` already started, use `brew services restart fail2ban` to restart.
Stopping `fail2ban`... (might take a while)
==> Successfully stopped `fail2ban` (label: homebrew.mxcl.fail2ban)

Source: link

Recent Questions on python

    Programming Languages