小编NIN*_*NJA的帖子

jetson nano 中没有名为 Markupsafe 的模块错误

No module named markupsafe我在 jetson nano 的虚拟环境中收到此错误

所以我尝试安装它pip install MarkupSafe 然后我得到了这个错误

$ pip --no-cache-dir install MarkupSafe
Collecting MarkupSafe
  Downloading https://files.pythonhosted.org/packages/bf/10/ff66fea6d1788c458663a84d88787bae15d45daa16f6b3ef33322a51fc7e/MarkupSafe-2.0.1.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-lm7zlz_0/MarkupSafe/setup.py", line 61, in <module>
        run_setup(True)
      File "/tmp/pip-build-lm7zlz_0/MarkupSafe/setup.py", line 44, in run_setup
        ext_modules=ext_modules if with_binary else [],
      File "/home/nano/spacy_test/env/lib/python3.6/site-packages/setuptools/__init__.py", line 129, in setup
        return distutils.core.setup(**attrs)
      File "/usr/lib/python3.6/distutils/core.py", line 121, in setup
        dist.parse_config_files()
      File "/home/nano/spacy_test/env/lib/python3.6/site-packages/setuptools/dist.py", line 494, in parse_config_files
        ignore_option_errors=ignore_option_errors) …
Run Code Online (Sandbox Code Playgroud)

pip python-3.x

7
推荐指数
1
解决办法
1万
查看次数

Django 未运行:ModuleNotFoundError:没有名为“encodings”的模块

我已经在新的 Ubuntu 17.10 服务器上安装了 django 网站。它基于python3。当我使用以下命令在开发模式下运行网站时效果很好

python manage.py runserver

但是当我尝试通过 apache2 网络服务器配置它时,port 80 通过编辑默认配置文件在 apache 中添加 wsgi ,如图所示。

<VirtualHost *:80>

    ServerAdmin webmaster@localhost

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    <Directory /home/usr/mygpsproject/gps_restapi/gps_restapi>
        <Files wsgi.py>
            Require all granted
        </Files>
    </Directory>

    WSGIDaemonProcess gps_restapi python-path=/home/usr/mygpsproject/gps_restapi/ python-home=/home/usr/mygpsproject/venv/bin/
    WSGIProcessGroup gps_restapi
    WSGIScriptAlias / /home/usr/mygpsproject/gps_restapi/gps_restapi/wsgi.py

</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

但网站无法正常工作。当我检查apache错误日志时发现这个错误......

[Sat Apr 14 16:16:09.201739 2018] [core:notice] [pid 5089:tid 140258267696064] AH00051: child pid 7500 exit signal Aborted (6), possible coredump in /etc/apache2
Fatal Python error: Py_Initialize: Unable to get the locale encoding
ModuleNotFoundError: …
Run Code Online (Sandbox Code Playgroud)

django ubuntu mod-wsgi apache2 python-3.x

2
推荐指数
1
解决办法
4641
查看次数

标签 统计

python-3.x ×2

apache2 ×1

django ×1

mod-wsgi ×1

pip ×1

ubuntu ×1