未找到tomcat用户python模块

dwthyt8l  于 2021-08-20  发布在  Java
关注(0)|答案(0)|浏览(286)

tomcat用户或任何使用python2或python3的用户都找不到boto3模块,而在从根目录运行python2或3的情况下可以很好地工作。

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

根用户工作

  1. [root@server-name]# python
  2. Python 2.7.5 (default, Nov 16 2020, 22:23:17)
  3. [GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux2
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. >>> import boto3
  6. >>>

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题