I've been following this tutorial and it states that
The $PYTHONPATH variable seems to get unset randomly, and causes errors for later steps.
and then to add the following to ~/.bashrc
:
export PYTHONPATH='/usr/lib/python2.7:/usr/lib/python2.7/plat-x86_64-linux-gnu:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload:/usr/local/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages:/usr/lib/python2.7/dist-packages/PILcompat'
I did this and then tried to install a bunch of pip packages with pip install -r requirements.txt
I get a load of errors when installing all the packages, this can be seen here.
I think this relates to the issue with PYTHONPATH. Why do I receive this error and what can be done so that I get no errors when using python and pip? Thanks.
Edit:
I've checked other tutorials for setting up Flask with Ubuntu and none have stated changing PYTHONPATH
. I followed this tutorial and tried installing packages in a virtualenv but I get errors. I tried installing a package called python-bcrypt but get this in the terminal:
bcrypt/bcrypt_python.c:17:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
I tried installing pycrypto and got the same:
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -fwrapv -Wall -Wstrict-prototypes -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/python2.7 -c src/MD2.c -o build/temp.linux-x86_64-2.7/src/MD2.o
src/MD2.c:31:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Is there any reasons for this? Thanks.