PyLint “Unable to import” error – how to set PYTHONPATH?

There are two options I’m aware of. One, change the PYTHONPATH environment variable to include the directory above your module. Alternatively, edit ~/.pylintrc to include the directory above your module, like this: [MASTER] init-hook=’import sys; sys.path.append(“/path/to/root”)’ (Or in other version of pylint, the init-hook requires you to change [General] to [MASTER]) Both of these options … Read more

Cron and virtualenv

You should be able to do this by using the python in your virtual environment: /home/my/virtual/bin/python /home/my/project/manage.py command arg EDIT: If your django project isn’t in the PYTHONPATH, then you’ll need to switch to the right directory: cd /home/my/project && /home/my/virtual/bin/python … You can also try to log the failure from cron: cd /home/my/project && … Read more

No acceptable C compiler found in $PATH when installing python

The gcc compiler is not in your $PATH. It means either you dont have gcc installed or it’s not in your $PATH variable. To install gcc use this: (run as root) Redhat base: yum groupinstall “Development Tools” Debian base: apt-get install build-essential openSUSE base: zypper install –type pattern devel_basis Alpine: apk add build-base

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)