简体   繁体   English

gcc 6.3 --> 致命 Python 错误:Py_Initialize:无法获取语言环境编码 ModuleNotFoundError:没有名为“编码”的模块

[英]gcc 6.3 --> Fatal Python error: Py_Initialize: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings'

I am trying to install a Python package and I get this error in CentOS7:我正在尝试安装 Python package 并在 CentOS7 中收到此错误:

Fatal Python error: Py_Initialize: Unable to get the locale encoding

ModuleNotFoundError: No module named 'encodings'

Complete log is here: https://pastebin.com/raw/xs6zFKVg完整的日志在这里: https://pastebin.com/raw/xs6zFKVg

Here is the package named Kaolin from NVIDIA: https://github.com/NVIDIAGameWorks/kaolin这是来自 NVIDIA 的名为 Kaolin 的 package: https://github.com/NVIDIAGameWorks/kaolin

This error happens after I switch to gcc 6.3 and enter this command: python setup.py install在我切换到 gcc 6.3 并输入以下命令后发生此错误: python setup.py install

How should I fix it?我应该如何解决它?

Note that, initially I had GCC 7 and I used the following commands to move onto GCC 6.3 (seems like CUDA had compatability problem with GCC 7 so I had to switch): Note that, initially I had GCC 7 and I used the following commands to move onto GCC 6.3 (seems like CUDA had compatability problem with GCC 7 so I had to switch):

$ sudo yum install devtoolset-6

and

$ scl enable devtoolset-6 bash

Now I have:我现在有:

$ gcc --version
gcc (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
I am not sure if what I did above was the best bet or if this must have caused this new issue.

I fixed the problem using the following commands:我使用以下命令解决了这个问题:

$ conda create -p /scratch3/3d_pose/kaolin_env python=3.6 numpy cython pytorch-gpu "matplotlib<3.0.0" scikit-image shapely "trimesh>=3.0" scipy sphinx "pytest>=4.6" "pytest-cov>=2.7" tqdm Cython autopep8 flake8

$ conda activate /scratch3/3d_pose/kaolin_env

$ pip install pptk

$ python setup.py install

Still the import kaolin throws an error even from the.. of kaolin repo.即使来自高岭土回购的.., import kaolin仍然会引发错误。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Ubuntu,Apache2,Django)致命Python错误:Py_Initialize:无法获取区域设置编码ImportError:没有名为“ encodings”的模块 - Ubuntu , Apache2 , Django ) Fatal Python error: Py_Initialize: Unable to get the locale encoding ImportError: No module named 'encodings' 致命的 Python 错误:Py_Initialize:无法加载文件系统编解码器。 导入错误:没有名为“编码”的模块 - Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' Python3.3-致命的Python错误:Py_Initialize:无法获取语言环境编码 - Python3.3 - Fatal Python error: Py_Initialize: Unable to get the locale encoding GDB崩溃 - UNEXPECTED GDB STDERR:致命Python错误:Py_Initialize:无法获取语言环境编码 - GDB crashing - UNEXPECTED GDB STDERR: Fatal Python error: Py_Initialize: Unable to get the locale encoding uWSGI致命Python错误:Py_Initialize:无法获取语言环境编码 - uWSGI Fatal Python error: Py_Initialize: Unable to get the locale encoding Django + mod_wsgi 致命的 Python 错误:Py_Initialize:没有名为 Encodings 的模块 - Django + mod_wsgi Fatal Python Error: Py_Initialize: No module named Encodings Py_Initialize引发ModuleNotFoundError:没有名为“编码”的模块 - Py_Initialize throws ModuleNotFoundError: No module named 'encodings' 致命的Python错误:Py_Initialize:当从Abaqus子例程调用Python时,无法获得语言环境编码错误 - Fatal Python error: Py_Initialize: Unable to get the locale encoding error when Python called from Abaqus subroutine Uwsgi失败:Py_Initialize:无法获取语言环境编码 - Uwsgi fails with: Py_Initialize: Unable to get the locale encoding 致命的Python错误:Py_Initialize:无法加载文件系统编解码器和ModuleNotFoundError - Fatal Python error: Py_Initialize: unable to load the file system codec & ModuleNotFoundError
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM