首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gcc 6.3 -->致命的Python错误: Py_Initialize:无法获取区域设置编码ModuleNotFoundError:没有名为'encodings‘的模块

gcc 6.3 -->致命的Python错误: Py_Initialize:无法获取区域设置编码ModuleNotFoundError:没有名为'encodings‘的模块
EN

Stack Overflow用户
提问于 2019-11-14 10:21:56
回答 1查看 399关注 0票数 0

我正在尝试安装Python包,但在CentOS7中得到以下错误:

代码语言:javascript
复制
Fatal Python error: Py_Initialize: Unable to get the locale encoding

ModuleNotFoundError: No module named 'encodings'

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

以下是来自NVIDIA:https://github.com/NVIDIAGameWorks/kaolin的名为高岭土的包

在我切换到gcc 6.3并输入以下命令后出现此错误:python setup.py install

我该怎么解决它呢?

请注意,最初我使用的是GCC 7,我使用以下命令迁移到了GCC 6.3 (似乎CUDA与GCC 7存在兼容性问题,所以我不得不切换):

代码语言:javascript
复制
$ sudo yum install devtoolset-6

代码语言:javascript
复制
$ scl enable devtoolset-6 bash

现在我有了:

代码语言:javascript
复制
$ 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.
EN

回答 1

Stack Overflow用户

发布于 2019-12-04 01:06:37

我使用以下命令修复了这个问题:

代码语言:javascript
复制
$ 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

尽管如此,import kaolin还是会抛出错误,即使是从..高岭土回收站。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58848455

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档