python - python:无法打开文件“帮助”:[Errno 2]没有这样的文件或目录
问题描述
我正在尝试在我的 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 命令不起作用/无法识别。我已经搜索了各种解决方案,但找不到有关此问题的任何解决方案。这里的任何人都可以帮我强调我可能犯的错误吗?以及如何解决?
解决方案
当您打电话时,python help
您正试图打开文件help
。你想要的是打电话python --help
。如果你想安装请求,你可以这样做pip install requests
。
推荐阅读
- wordpress - 用户在结帐页面登录时如何防止会话不重置?
- php - WordPress多站点域映射导致白屏
- python - 从多个字符串中提取序列
- regex - 如何使 Nginx 重写变得懒惰(非贪婪)
- aframe - aframe - 动态改变相机位置
- ssas - 如何在执行 mdx 查询时获取没有限定符的表列名
- nginx - 禁用某些目录的规则
- sql-server - SQL Server 查询解释 - 逗号分隔值到单独的行
- dns - virtualbox:--natdnsproxy1 和--natdnshostresolver1 有什么区别?
- php - 在 mysql_fetch_array 行中打印一个自定义行