14 votes
Accepted

Failed building wheel for twisted

The error message is not particularly helpful but it seems you are missing the python3.6-dev package, which is installed using apt: sudo apt update sudo apt install python3.6-dev After this, repeat ...
edwinksl's user avatar
  • 23.8k
14 votes

"pip install requirements.txt" command returns many errors, including 404 not found

You are missing -r command flag, so go again with: pip install -r requirements.txt As it was before, pip just try to get requirements-txt from remote store expecting it to be a package name. See ...
user.dz's user avatar
  • 48.1k
7 votes

Django installed, but can't import django in python

I had the same problem when I was using PyCharm Community Edition for making Django projects. For me, the following steps worked: It turns out that python wants you to create a virtual environment, ...
Sourav Samanta's user avatar
6 votes

Failed building wheel for twisted

You also need to the build-essential package if it hasn't been installed already. The complete install command is: sudo apt-get install build-essential python3.6-dev
Steve Rawlinson's user avatar
5 votes

How do you install mod_wsgi?

Step 1: The following command will install wgsi module sudo apt-get install libapache2-mod-wsgi Step 2: To enable the wsgi module run the following command sudo a2enmod wsgi Step 3: Restart your ...
kragh-dev's user avatar
5 votes
Accepted

systemctl .service can't read the environment variable

that shown my django can't access(read) the environment variable Because systemd is not running in a shell with your user and that user environment and those variables. when i running uwsgi in ...
Rinzwind's user avatar
  • 299k
4 votes

DistutilsExtra problem

nowadays (2020) it is this (Python v2): sudo apt-get install python-distutils-extra or this (Python v3): sudo apt-get install python3-distutils-extra
hoijui's user avatar
  • 153
4 votes
Accepted

ImportError: No module named context_processors

Setting.py for django1.8:- in TEMPLATES 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth....
Rohit Gavfale's user avatar
4 votes
Accepted

For every Framework new Python Env?

Start programming in PyCharm like in Windows and install everything that belongs to the current project in one venv. Whenever you install a Python package specifically for a project, PyCharm adds the ...
karel's user avatar
  • 115k
4 votes
Accepted

crontab fails to write logs

When you chain commands and add redirection like cmd1 && cmd2 && cmd3 >> somefile 2>&1 (or cmd1 ; cmd2 ; cmd3 >> somefile 2>&1 etc.) the redirections only ...
steeldriver's user avatar
4 votes

Django + Nginx, and Gunicorn: doesn't create gunicorn.sock

You aren't far off, you simply forgot to separate your section header and your file in the socket file's config. Like this: [Unit] Description=gunicorn socket [Socket] ListenStream=/run/gunicorn.sock [...
Thomas Ward's user avatar
  • 74.4k
4 votes
Accepted

CERTIFICATE_VERIFY_FAILED error

It looks like the context needs to be passed into an HTTPSHandler in order to make use of the certifi certificates. Try patching your local copy of /usr/local/lib/python3.8/dist-packages/...
hBy2Py's user avatar
  • 206
3 votes

environment variable not working

If you want to keep the assignments in a separate env_var file, you would need to source it from one of your shell's startup files, rather than adding it to your PATH For example, you could add ...
steeldriver's user avatar
3 votes

'mysqld' using a lot of ram in Ubuntu 16.04, is it normal?

No, it is not normal. It is caused by the bug Excessive memory used in memory/innodb/os0file starting 5.7.8. It is tracked in Ubuntu as Excessive consumption RAM of mysqld daemon in Ubuntu 16.04, ...
colan's user avatar
  • 1,155
3 votes
Accepted

Error while creating a projrct with djangocms -p test1 test1 with exit status 1?

Put the command together and run it manually, without the -q quite argument so you can see where it's breaking: pip install -Ur /dev/stdin <<EOF django-cms<3.3 django-treebeard>=2.0 https:...
Oli's user avatar
  • 293k
3 votes
Accepted

DistutilsExtra problem

As per this page, it is suggested to install python-apt through aptitude itself: sudo apt-get install python-apt
Tom's user avatar
  • 46
3 votes

How can I install Django for Python 3.x?

Guys there is an easy way using virtualenvwrapper, by far the most easiest to manage Python 2.7/3.x virtual environments in Ubuntu/Debian. $ sudo apt-get install python3 virtualenvwrapper $ ...
Sandeep's user avatar
  • 590
3 votes

Linux Environment Variables in sudo

You can use the -E command with sudo to keep your environment variables -E' The -E (preserve environment) option indicates to the security policy that the user wishes to preserve their existing ...
Brandhout's user avatar
2 votes

How do I fix "chdir(): No such file or directory [uwsgi.c line 1723]" on in wsgi on nginx?

The chdir error message indicates that it is trying to get a dir that doesn't exist. It would appear from your displayed output that, that dir would either be /home/rajesh/treeio or /home/treeio/. ...
odoncaoa's user avatar
2 votes

Python 3.5 is unable to access packages installed with pip3 like django

Run the follwing: as mentioned above, you need to apt-get install python-django or python3-django sudo apt-get install python-pip (or sudo apt-get install python3-pip) sudo apt-get install mysql-...
Hellas's user avatar
  • 69
2 votes

Crontab executes Django command, but nothing happens

I have found the answer to my problem, and in doing so also realized that my title for this post is in fact incorrect: crontab was executing, but the issue was that the python commands within my cron ...
user14678939's user avatar
2 votes
Accepted

What are the differences between mod-wsgi and libapache2-mod-wsgi-py3?

I quickly looked and it seems that package mod-wsgi is not an Ubuntu package. If you mention difference between libapache2-mod-wsgi and libapache2-mod-wsgi-py3, it only because the first use python 2 ...
ob2's user avatar
  • 3,553
2 votes

PyCharm Pro ImportError and Broken Virtualenv

from django.core.management import execute_from_command_line works perfectly plus you are getting the following error when using python3.7 interpreter in Ubuntu 19.04: You must provide a DEST_DIR ...
karel's user avatar
  • 115k
2 votes
Accepted

pam_unix(sudo:auth): authentication failure - Restarting apache2

SOLVED: In my django_project.conf I forgot to close a </Directory>. From <Directory> Something written here <Directory> to: <Directory> Something written here </...
Magofoco's user avatar
  • 121
2 votes

Installing mysqlclient using pip problem

Found the answer! Finally! I needed to install libssl-dev.
Kaiss Bouali's user avatar
2 votes
Accepted

Django crontab is not running, even i setup everything

Your code actually works. You may be think that print("1") should appear in stdout? So it doesn't work that way, because cron doesn't use stdour and stderr for it's output. To see actual ...
Askar Musaev's user avatar
2 votes
Accepted

CronJob Not running

You should redirect both standard input and standard error from the crontab execution like below: 0 2 * * * /usr/bin/python3 /home/user/folder1/folder11/script2.py > /tmp/script2.log 2>&1 ...
Simon Banks's user avatar
  • 1,337
1 vote

while creating module getting error

It's a good idea to create django projects in isolated environments, called virtualenvs. To get one type: sudo apt install python-pip to get pip. Then: pip install virtualenv virtualenv env-name -p ...
gonczor's user avatar
  • 181
1 vote
Accepted

while creating module getting error

I'm not sure, but installation of python-django package may help: sudo apt-get install python-django
N0rbert's user avatar
  • 99.8k

Only top scored, non community-wiki answers of a minimum length are eligible