WARNING: The script httpx.exe is installed in ‘C:\Users\85045\AppData\Local\Packages\PythonSoftware

文章讲述了如何处理Python脚本路径不在环境变量PATH中的问题,以及如何因Windows长路径限制导致的安装包安装失败。提供了解决方案,包括添加脚本路径到PATH和启用Windows长路径支持。
部署运行你感兴趣的模型镜像
WARNING: The script httpx.exe is installed in 'C:\Users\85045\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script ddgs.exe is installed in 'C:\Users\85045\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'C:\\Users\\85045\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python311\\site-packages\\transformers\\models\\deprecated\\trajectory_transformer\\convert_trajectory_transformer_original_pytorch_checkpoint_to_pytorch.py'   
HINT: This error might have occurred since this system does not have Windows Long Path support enabled. You can find information on how to enable this at https://pip.pypa.io/warnings/enable-long-paths

您遇到的问题涉及两个主要方面:一是 Python 脚本路径不在环境变量 PATH 中,二是安装包时由于路径过长导致的错误。以下是针对这些问题的解决方案:

1. 添加 Python 脚本路径到环境变量 PATH

这个警告提示您将 Python Scripts 目录添加到环境变量 PATH。这样做可以让您直接从命令行运行那些安装的脚本。要添加此路径,请按照以下步骤操作:

  1. Win + R,输入 sysdm.cpl,然后按 Enter 打开系统属性。
  2. 转到“高级”选项卡,然后点击“环境变量”。
  3. 在“系统变量”或“用户变量”区域(取决于您想要对所有用户还是仅对当前用户应用更改),找到并选择变量“Path”,然后点击“编辑”。
  4. 点击“新建”,然后粘贴路径 C:\Users\85045\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\Scripts
  5. 点击“确定”保存更改。

2. 解决由于 Windows 长路径限制导致的安装错误

Windows 默认限制文件路径长度为 260 个字符。当文件路径超过这个限制时,可能会导致各种问题,比如您遇到的安装错误。为解决此问题,您可以启用 Windows 的长路径支持:

  1. Win + R,输入 regedit,然后按 Enter 打开注册表编辑器。
  2. 导航至 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
  3. 找到名为 LongPathsEnabled 的项(如果不存在,则创建一个新的 DWORD (32位) 值,并命名为 LongPathsEnabled)。
  4. 双击 LongPathsEnabled,将值设置为 1,然后点击“确定”。
  5. 重启计算机以应用更改。

完成这些步骤后,您应该能够安装较长路径的包而不会遇到错误。

请注意,编辑注册表和环境变量可能会对系统造成影响,所以请谨慎操作,并在进行更改前确保您了解这些操作的含义。如果您不确定,可以寻求更多帮助或与知识渊博的人士咨询。

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

Python3.9

Python3.9

Conda
Python

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

WARNING: The script wheel.exe is installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script websockets.exe is installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script wsdump.exe is installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script dotenv.exe is installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts nosetests.exe and pynose.exe are installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script pygmentize.exe is installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts pip.exe, pip3.9.exe and pip3.exe are installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts f2py.exe and numpy-config.exe are installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script normalizer.exe is installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script chardetect.exe is installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script markdown-it.exe is installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts py.test.exe and pytest.exe are installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script playwright.exe is installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script behave.exe is installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script httpx.exe is installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The scripts sbase.exe and seleniumbase.exe are installed in 'C:\Users\Administrator\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
05-14
Installing collected packages: pyserial, pyelftools, bottle, urllib3, typing_extensions, tabulate, sniffio, semantic_version, packaging, idna, h11, colorama, charset-normalizer, certifi, ajsonrpc, wsproto, requests, marshmallow, click, anyio, uvicorn, starlette, platformio ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/23 [pyserial] WARNING: The scripts pyserial-miniterm.exe and pyserial-ports.exe are installed in 'C:\Users\30547\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2/23 [bottle] WARNING: The script bottle.exe is installed in 'C:\Users\30547\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4/23 [typing_extensions] WARNING: The script tabulate.exe is installed in 'C:\Users\30547\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━ 12/23 [charset-normalizer] WARNING: The script normalizer.exe is installed in 'C:\Users\30547\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━ 14/23 [ajsonrpc] WARNING: The script async-json-rpc-server.exe is installed in 'C:\Users\30547\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━━━ 20/23 [uvicorn] WARNING: The script uvicorn.exe is installed in 'C:\Users\30547\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━ 22/23 [platformio] WARNING: The scripts pio.exe, piodebuggdb.exe and platformio.exe are installed in 'C:\Users\30547\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.12_qbz5n2kfra8p0\LocalCache\local-packages\Python312\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed ajsonrpc-1.2.0 anyio-4.9.0 bottle-0.13.3 certifi-2025.4.26 charset-normalizer-3.4.2 click-8.1.7 colorama-0.4.6 h11-0.16.0 idna-3.10 marshmallow-3.26.1 packaging-25.0 platformio-6.1.18 pyelftools-0.32 pyserial-3.5 requests-2.32.3 semantic_version-2.10.0 sniffio-1.3.1 starlette-0.46.2 tabulate-0.9.0 typing_extensions-4.13.2 urllib3-2.4.0 uvicorn-0.34.2 wsproto-1.2.0
05-14
Using cached future-1.0.0-py3-none-any.whl (491 kB) Installing collected packages: tensorboard-plugin-wit, rfc3986, keras, flatbuffers, tensorflow-io-gcs-filesystem, tensorflow-estimator, tensorboard-data-server, sniffio, pyasn1, protobuf, oauthlib, keras-preprocessing, hyperframe, hpack, h11, gast, future, click, cachetools, typer, rsa, requests-oauthlib, pyasn1-modules, pandas, norbert, h2, ffmpeg-python, anyio, httpcore, google-auth, httpx, google-auth-oauthlib, tensorboard, tensorflow, spleeter ━━━━━━━━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━ 16/35 [future] WARNING: The scripts futurize.exe and pasteurize.exe are installed in 'C:\Users\lml\AppData\Roaming\Python\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ━━━━━━━━━━━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━ 18/35 [cachetools] WARNING: The scripts pyrsa-decrypt.exe, pyrsa-encrypt.exe, pyrsa-keygen.exe, pyrsa-priv2pub.exe, pyrsa-sign.exe and pyrsa-verify.exe are installed in 'C:\Users\lml\AppData\Roaming\Python\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Attempting uninstall: pandas Found existing installation: pandas 2.3.2 Uninstalling pandas-2.3.2: Successfully uninstalled pandas-2.3.2 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━━━━ 30/35 [httpx] WARNING: The script google-oauthlib-tool.exe is installed in 'C:\Users\lml\AppData\Roaming\Python\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━━ 32/35 [tensorboard] WARNING: The script tensorboard.exe is installed in 'C:\Users\lml\AppData\Roaming\Python\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╸━━ 33/35 [tensorflow] WARNING: The scripts estimator_ckpt_converter.exe, import_pb_to_tensorboard.exe, saved_model_cli.exe, tensorboard.exe, tf_upgrade_v2.exe, tflite_convert.exe, toco.exe and toco_from_protos.exe are installed in 'C:\Users\lml\AppData\Roaming\Python\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. WARNING: The script spleeter.exe is installed in 'C:\Users\lml\AppData\Roaming\Python\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed anyio-3.7.1 cachetools-5.5.2 click-7.1.2 ffmpeg-python-0.2.0 flatbuffers-1.12 future-1.0.0 gast-0.4.0 google-auth-2.40.3 google-auth-oauthlib-0.4.6 h11-0.12.0 h2-4.3.0 hpack-4.1.0 httpcore-0.13.7 httpx-0.19.0 hyperframe-6.1.0 keras-2.9.0 keras-preprocessing-1.1.2 norbert-0.2.1 oauthlib-3.3.1 pandas-1.5.3 protobuf-3.19.6 pyasn1-0.6.1 pyasn1-modules-0.4.2 requests-oauthlib-2.0.0 rfc3986-1.5.0 rsa-4.9.1 sniffio-1.3.1 spleeter-2.4.0 tensorboard-2.9.1 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.1 tensorflow-2.9.3 tensorflow-estimator-2.9.0 tensorflow-io-gcs-filesystem-0.31.0 typer-0.3.2 PS D:\lml> spleeter --help spleeter : 无法将“spleeter”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保 路径正确,然后再试一次。 所在位置 行:1 字符: 1 + spleeter --help + ~~~~~~~~ + CategoryInfo : ObjectNotFound: (spleeter:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS D:\lml>
09-07
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

MonkeyKing.sun

对你有帮助的话,可以打赏

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

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

打赏作者

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

抵扣说明:

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

余额充值