python 命令行 help() ‘more’不是内部或外部命令,也不是可运行的程序或批处理文件

博客指出使用Python的help命令可能出现问题,原因是未设置好环境变量。解决方案为打开控制面板,修改用户环境变量,在Path中新建“%SystemRoot%\\System32\\”,最后重新打开命令行,即可正常使用help命令。
部署运行你感兴趣的模型镜像

一、问题描述

使用python的help命令时,有可能出现以下现象:

出现这种现象的原因是因为没有设置好环境变量,进行如下设置即可

二、解决方案

1、打开控制面板

2、修改用户的环境变量

在Path中新建"%SystemRoot%\System32\",确定即可

3、重新打开命令行,即可使用help

您可能感兴趣的与本文相关的镜像

Python3.10

Python3.10

Conda
Python

Python 是一种高级、解释型、通用的编程语言,以其简洁易读的语法而闻名,适用于广泛的应用,包括Web开发、数据分析、人工智能和自动化脚本

(gs_env) D:\gaussian-splatting>set PYTHONPATH=%cd%;%PYTHONPATH% (gs_env) D:\gaussian-splatting># 运行验证脚本 '#' 不是内部外部命令,也不是可运行程序 批处理文件。 (gs_env) D:\gaussian-splatting>python -c "import tqdm, numpy as np; print(f'tqdm {tqdm.__version__}, numpy {np.__version__}')" tqdm 4.67.1, numpy 2.0.2 (gs_env) D:\gaussian-splatting>pythpn 'pythpn' 不是内部外部命令,也不是可运行程序 批处理文件。 (gs_env) D:\gaussian-splatting>python Python 3.9.25 (main, Nov 3 2025, 22:44:01) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> python -c "import tqdm, numpy as np; print(f'tqdm {tqdm.__version__}, numpy {np.__version__}')" File "<stdin>", line 1 python -c "import tqdm, numpy as np; print(f'tqdm {tqdm.__version__}, numpy {np.__version__}')" ^ SyntaxError: invalid syntax >>> exit Use exit() or Ctrl-Z plus Return to exit >>> exit() (gs_env) D:\gaussian-splatting>set NUMPY_INCLUDE_DIR=%CONDA_PREFIX%\Lib\site-packages\numpy\core\include (gs_env) D:\gaussian-splatting>pyhton 'pyhton' 不是内部外部命令,也不是可运行程序 批处理文件。 (gs_env) D:\gaussian-splatting>python Python 3.9.25 (main, Nov 3 2025, 22:44:01) [MSC v.1929 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> # 运行验证脚本 >>> python -c "import tqdm, numpy as np; print(f'tqdm {tqdm.__version__}, numpy {np.__version__}')" File "<stdin>", line 1 python -c "import tqdm, numpy as np; print(f'tqdm {tqdm.__version__}, numpy {np.__version__}')" ^ SyntaxError: invalid syntax >>>
最新发布
11-09
done (base) C:\Users\DELL>conda info --envs # conda environments: # base * E:\anaconda tensorflow-cpu E:\anaconda\envs\tensorflow-cpu tf_cpu_env E:\anaconda\envs\tf_cpu_env tf_gpu_env E:\anaconda\envs\tf_gpu_env (base) C:\Users\DELL>conda activate tensorflow-cpu (tensorflow-cpu) C:\Users\DELL>python Python 3.7.16 (default, Jan 17 2023, 16:06:28) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import tensorflow as tf Traceback (most recent call last): File "<stdin>", line 1, in <module> ModuleNotFoundError: No module named 'tensorflow' >>> print(tf.__version__) Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'tf' is not defined >>> ^Z (tensorflow-cpu) C:\Users\DELL>conda list | grep tensorflow 'grep' 不是内部外部命令,也不是可运行程序 批处理文件。 (tensorflow-cpu) C:\Users\DELL>^Z (tensorflow-cpu) C:\Users\DELL>conda deactivate C:\Users\DELL>conda list | grep tensorflow 'grep' 不是内部外部命令,也不是可运行程序 批处理文件。 C:\Users\DELL>conda list | findstr tensorflow tensorflow 2.3.0 pypi_0 pypi tensorflow-estimator 2.3.0 pypi_0 pypi C:\Users\DELL>conda update tensorflow PackageNotInstalledError: Package is not installed in prefix. prefix: E:\anaconda package name: tensorflow C:\Users\DELL>conda activate 3.7 Could not find conda environment: 3.7 You can list all discoverable environments with `conda info --envs`. C:\Users\DELL>pip install tensorflow Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Requirement already satisfied: tensorflow in e:\anaconda\lib\site-packages (2.3.0) Requirement already satisfied: keras-preprocessing<1.2,>=1.1.1 in c:\users\dell\appdata\roaming\python\python37\site-packages (from tensorflow) (1.1.2) Requirement already satisfied: termcolor>=1.1.0 in e:\anaconda\lib\site-packages (from tensorflow) (2.3.0) Requirement already satisfied: h5py<2.11.0,>=2.10.0 in e:\anaconda\lib\site-packages (from tensorflow) (2.10.0) Requirement already satisfied: grpcio>=1.8.6 in e:\anaconda\lib\site-packages (from tensorflow) (1.62.3) Requirement already satisfied: protobuf>=3.9.2 in e:\anaconda\lib\site-packages (from tensorflow) (4.24.4) Requirement already satisfied: six>=1.12.0 in e:\anaconda\lib\site-packages (from tensorflow) (1.12.0) Requirement already satisfied: google-pasta>=0.1.8 in e:\anaconda\lib\site-packages (from tensorflow) (0.2.0) Requirement already satisfied: gast==0.3.3 in e:\anaconda\lib\site-packages (from tensorflow) (0.3.3) Requirement already satisfied: wheel>=0.26 in e:\anaconda\lib\site-packages (from tensorflow) (0.33.4) Requirement already satisfied: wrapt>=1.11.1 in e:\anaconda\lib\site-packages (from tensorflow) (1.11.2) Requirement already satisfied: opt-einsum>=2.3.2 in e:\anaconda\lib\site-packages (from tensorflow) (3.3.0) Requirement already satisfied: astunparse==1.6.3 in e:\anaconda\lib\site-packages (from tensorflow) (1.6.3) Requirement already satisfied: tensorboard<3,>=2.3.0 in e:\anaconda\lib\site-packages (from tensorflow) (2.11.2) Requirement already satisfied: tensorflow-estimator<2.4.0,>=2.3.0 in e:\anaconda\lib\site-packages (from tensorflow) (2.3.0) Requirement already satisfied: numpy<1.19.0,>=1.16.0 in e:\anaconda\lib\site-packages (from tensorflow) (1.16.4) Requirement already satisfied: scipy==1.4.1 in e:\anaconda\lib\site-packages (from tensorflow) (1.4.1) Requirement already satisfied: absl-py>=0.7.0 in e:\anaconda\lib\site-packages (from tensorflow) (2.1.0) Requirement already satisfied: requests<3,>=2.21.0 in e:\anaconda\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (2.22.0) Requirement already satisfied: setuptools>=41.0.0 in e:\anaconda\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (41.0.1) Requirement already satisfied: werkzeug>=1.0.1 in e:\anaconda\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (2.2.3) Requirement already satisfied: markdown>=2.6.8 in e:\anaconda\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (3.4.4) Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in e:\anaconda\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (0.6.1) Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in e:\anaconda\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (1.8.1) Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in e:\anaconda\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (0.4.6) Requirement already satisfied: google-auth<3,>=1.6.3 in e:\anaconda\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow) (2.42.0) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in e:\anaconda\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (1.24.2) Requirement already satisfied: idna<2.9,>=2.5 in e:\anaconda\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2.8) Requirement already satisfied: chardet<3.1.0,>=3.0.2 in e:\anaconda\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (3.0.4) Requirement already satisfied: certifi>=2017.4.17 in e:\anaconda\lib\site-packages (from requests<3,>=2.21.0->tensorboard<3,>=2.3.0->tensorflow) (2019.6.16) Requirement already satisfied: MarkupSafe>=2.1.1 in e:\anaconda\lib\site-packages (from werkzeug>=1.0.1->tensorboard<3,>=2.3.0->tensorflow) (2.1.5) Requirement already satisfied: importlib-metadata>=4.4; python_version < "3.10" in e:\anaconda\lib\site-packages (from markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow) (6.7.0) Requirement already satisfied: requests-oauthlib>=0.7.0 in e:\anaconda\lib\site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow) (2.0.0) Requirement already satisfied: cachetools<7.0,>=2.0.0 in e:\anaconda\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (5.5.2) Requirement already satisfied: pyasn1-modules>=0.2.1 in e:\anaconda\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (0.3.0) Requirement already satisfied: rsa<5,>=3.1.4 in e:\anaconda\lib\site-packages (from google-auth<3,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (4.9.1) Requirement already satisfied: typing-extensions>=3.6.4; python_version < "3.8" in e:\anaconda\lib\site-packages (from importlib-metadata>=4.4; python_version < "3.10"->markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow) (4.7.1) Requirement already satisfied: zipp>=0.5 in e:\anaconda\lib\site-packages (from importlib-metadata>=4.4; python_version < "3.10"->markdown>=2.6.8->tensorboard<3,>=2.3.0->tensorflow) (0.5.1) Requirement already satisfied: oauthlib>=3.0.0 in e:\anaconda\lib\site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard<3,>=2.3.0->tensorflow) (3.2.2) Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in e:\anaconda\lib\site-packages (from pyasn1-modules>=0.2.1->google-auth<3,>=1.6.3->tensorboard<3,>=2.3.0->tensorflow) (0.5.1) C:\Users\DELL>pip install tensorflow==2.12.0 Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Collecting tensorflow==2.12.0 ERROR: Could not find a version that satisfies the requirement tensorflow==2.12.0 (from versions: 1.13.1, 1.13.2, 1.14.0, 1.15.0, 1.15.2, 1.15.3, 1.15.4, 1.15.5, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0, 2.10.1, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0) ERROR: No matching distribution found for tensorflow==2.12.0 C:\Users\DELL>pip install tensorflow==2.12.0 -i https://pypi.tuna.tsinghua.edu.cn/simple Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting tensorflow==2.12.0 ERROR: Could not find a version that satisfies the requirement tensorflow==2.12.0 (from versions: 1.13.1, 1.13.2, 1.14.0, 1.15.0, 1.15.2, 1.15.3, 1.15.4, 1.15.5, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0, 2.10.1, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0) ERROR: No matching distribution found for tensorflow==2.12.0 C:\Users\DELL> C:\Users\DELL>C:\Users\DELL>pip install tensorflow==2.12.0 -i https://pypi.tuna.tsinghua.edu.cn/simple 'C:\Users\DELL' 不是内部外部命令,也不是可运行程序 批处理文件。 C:\Users\DELL>Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple 'Looking' 不是内部外部命令,也不是可运行程序 批处理文件。 C:\Users\DELL>Collecting tensorflow==2.12.0 'Collecting' 不是内部外部命令,也不是可运行程序 批处理文件。 C:\Users\DELL> ERROR: Could not find a version that satisfies the requirement tensorflow==2.12.0 (from versions: 1.13.1, 1.13.2, 1.14.0, 1.15.0, 1.15.2, 1.15.3, 1.15.4, 1.15.5, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0, 2.10.1, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0) 'ERROR:' 不是内部外部命令,也不是可运行程序 批处理文件。 C:\Users\DELL>ERROR: No matching distribution found for tensorflow==2.12.0 'ERROR:' 不是内部外部命令,也不是可运行程序 批处理文件。 C:\Users\DELL> C:\Users\DELL>C:\Users\DELL> 命令语法不正确。 C:\Users\DELL> C:\Users\DELL>python --version Python 3.7.3 C:\Users\DELL>pip install tensorflow==2.12.0 -i https://pypi.tuna.tsinghua.edu.cn/simple Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple Collecting tensorflow==2.12.0 ERROR: Could not find a version that satisfies the requirement tensorflow==2.12.0 (from versions: 1.13.1, 1.13.2, 1.14.0, 1.15.0, 1.15.2, 1.15.3, 1.15.4, 1.15.5, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.5.0, 2.5.1, 2.5.2, 2.5.3, 2.6.0rc0, 2.6.0rc1, 2.6.0rc2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5, 2.7.0rc0, 2.7.0rc1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.7.4, 2.8.0rc0, 2.8.0rc1, 2.8.0, 2.8.1, 2.8.2, 2.8.3, 2.8.4, 2.9.0rc0, 2.9.0rc1, 2.9.0rc2, 2.9.0, 2.9.1, 2.9.2, 2.9.3, 2.10.0rc0, 2.10.0rc1, 2.10.0rc2, 2.10.0rc3, 2.10.0, 2.10.1, 2.11.0rc0, 2.11.0rc1, 2.11.0rc2, 2.11.0) ERROR: No matching distribution found for tensorflow==2.12.0 C:\Users\DELL>
10-30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Spring_24

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值