runserver
can now use Watchman to improve the performance of watching a large number of files for changes.
Python3.7
Python3.7 安装时遇到_ssl 模块没法编译成功,需要安装 openssl-1.0.2 版本以上
下载 openssl 版本包后解压指定路径安装1
2
3
4
5
6
7
8
9
10$ cd openssl-xxxx-dir
$ ./config --prefix=/usr/local/openssl
$ make && make install
# 如果你需要覆盖原来的openssl版本,请参考其他openssl安装教程
# 安装Python3.7 指定openssl路径
$ cd Python-3.7-dir
$ ./configure --prefix=/usr/local/python37 --enable-shared --with-openssl=/usr/local/openssl
$ make && make install
$ ln -s /usr/local/python37/bin/python3 /usr/sbin/
安装完 Django 后调试时发现输出如下1
2
3
4$ python3 manage.py runserver
Watchman unavailable: pywatchman not installed.
Watching for file changes with StatReloader
Performing system checks…
需要安装watchman
及pip install pywatchman
Watchman
django2.2 增加了对 watchman 的支持,更好进行调试1
2
3
4
5
6
7
8$ git clone https://github.com/facebook/watchman.git
$ cd watchman
$ git checkout v4.9.0 # the latest stable release
# 使用 Centos6 的需要修改`Makefile.am` 参考https://github.com/facebook/watchman/issues/534
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
遇到的问题
Watchman
安装遇到的问题:
configure: error: *** A compiler with support for C++11 language features is required.
解决办法:
1 | # 1. 安装yum centos-release-scl仓库: |