【发布时间】:2023-06-10 22:59:01
【问题描述】:
我正在尝试在我的 cpanel 项目上安装 python 包。但面临奇怪的问题。以下是各种命令的 cpanel 输出:
[root@host myproject]# python
Python 2.7.5 (default, Apr 11 2018, 07:36:10)[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2Type "help", "copyright", "credits" or "license" for more information.
当我尝试命令帮助时,得到以下响应:
[root@host myproject]# python help
python: can't open file 'help': [Errno 2] No such file or directory
我正在尝试从名为“myproject”的项目目录安装软件包。在安装软件包时,我得到了相同的响应:
[root@host myproject]# python install requests
python: can't open file 'install': [Errno 2] No such file or directory[root@host myproject]#
我从错误日志中了解到,python 命令无法正常工作/无法识别。我已经搜索了各种解决方案,但找不到有关此问题的任何解决方案。这里的任何人都可以帮我强调我可能犯的错误吗?以及如何解决?
【问题讨论】:
-
你能用
pip install requests代替python命令吗? -
首先,请上一门python课程,知道自己在做什么。其次,所有这些命令都是错误的,求助输入
python --help,安装模块输入pip install package。 -
1. python --help 2. pip 安装请求
标签: python python-2.7 python-requests