安装软件方面的问题及解决方法杂烩

1.VMware 安装 Ubuntu

        安装时弹出“内部错误”,原因是VMware部分服务项没有启动,启动后重启VMware

2.Ubuntu安装python3.7.4

    问题:zipimport.ZipImportError: can't decompress data; zlib not available

    需要安装zlib,sudo apt install zlib*

    问题:ModuleNotFoundError: No module named '_ctypes'<--点击看参考文章

    python3.7.0以上的版本需要安装 libffi-devel

    ubuntu:$ sudo apt-get install libffi-dev

    问题:pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.

解决:

    sudo apt-get install openssl

    sudo apt-get install libssl-dev

    安装openssl后,编译时加上--enable-optimizations(./configure –en…)

问题:No module named _sqlite3

解决:

sudo apt install libsqlite3-dev

然后重新编译安装:

./configure --enable-loadable-sqlite-extensions && make && sudo make install

1、报错:

  File "D:PythonPython37-32libsite-packagesdjangoviewsdebug.py", line 332, in get_traceback_html

  t = DEBUG_ENGINE.from_string(fh.read())  

UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 9737: illegal multibyte sequence

2、解决:

  打开django/views下的debug.py文件,转到line331行:

with Path(CURRENT_DIR, 'templates', 'technical_500.html').open() as fh

将其改成:

with Path(CURRENT_DIR, 'templates', 'technical_500.html').open(encoding="utf-8") as fh

就成功了。

原文地址:https://www.cnblogs.com/yulincoco/p/11881608.html