用Django做第一个app出现的问题和解决办法

1、installpip

python setup.py install

2、installdjango-appasuserlib:

python setup.py sdist
  (https://docs.djangoproject.com/en/1.5/intro/reusable-apps/)then you want to uninstall the app through pip tool, you may see
"importerror cannot import name httpshandler" error

thewaytofix

1、installopensslifthereareno/usr/local/ssl

downloadtheopenssl,

./configure

make

makeinstall

2、reinstallpython2.7.2fromsourcepackage,butyouneeduncommentbelowlinesbeforeinstall

Modules/Setup.dist

# Socket module helper for SSL support; you must comment out the other
# socket line above, and possibly edit the SSL variable:
SSL=/usr/local/ssl
_ssl _ssl.c \
    -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
    -L$(SSL)/lib -lssl -lcrypto

cdpython-source-dir

./confiugre

make

makeinstall

ln-s/usr/local/bin/python2.7/usr/bin/python

相关推荐