Py学习  »  Python

未找到tomcat用户python模块

Sid • 4 年前 • 336 次点击  

tomcat用户或任何使用python2或python3的用户都无法找到boto3模块,而从root运行python2或python3则可以。

-bash-4.2$ python
Python 2.7.5 (default, Nov 16 2020, 22:23:17)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named boto3
>>>
-bash-4.2$ whoami
tomcat

root用户工作

[root@server-name]# python
Python 2.7.5 (default, Nov 16 2020, 22:23:17)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto3
>>>
Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/128273