Chocolatey:为什么它在我的笔记本电脑上找不到我预装的 Python?

发布于 2025-01-15 22:25:03 字数 1575 浏览 5 评论 0原文

我的电脑里有整个 anaconda 套件和 python。但是,当我下载node.js和chocolatey时,出现以下错误代码并开始安装python。谁能告诉我为什么?

错误代码是:

Creating Chocolatey folders if they do not already exist.

WARNING: You can safely ignore errors related to missing log files when
  upgrading from a version of Chocolatey less than 0.9.9.
  'Batch file could not be found' is also safe to ignore.
  'The system cannot find the file specified' - also safe.
chocolatey.nupkg file not installed in lib.
 Attempting to locate it from bootstrapper.
PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...
WARNING: Not setting tab completion: Profile file does not exist at
'C:\Users\futur\OneDrive\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.
Ensuring Chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder
Chocolatey v0.12.1
Upgrading the following packages:
python;visualstudio2019-workload-vctools
By upgrading, you accept licenses for the packages.
python is not installed. Installing...
Progress: Downloading python3 3.10.3... 100%
Progress: Downloading python3 3.10.3... 100%
Progress: Downloading vcredist2015 14.0.24215.20170201... 100%
Progress: Downloading vcredist2015 14.0.24215.20170201... 100%
Progress: Downloading vcredist140 14.31.31103... 100%

非常感谢。

I have the entire anaconda suite and python in my computer. However, when I am downloading node.js and chocolatey, the following error code came out and started installing python. Can anyone tell me why?

The error code is:

Creating Chocolatey folders if they do not already exist.

WARNING: You can safely ignore errors related to missing log files when
  upgrading from a version of Chocolatey less than 0.9.9.
  'Batch file could not be found' is also safe to ignore.
  'The system cannot find the file specified' - also safe.
chocolatey.nupkg file not installed in lib.
 Attempting to locate it from bootstrapper.
PATH environment variable does not have C:\ProgramData\chocolatey\bin in it. Adding...
WARNING: Not setting tab completion: Profile file does not exist at
'C:\Users\futur\OneDrive\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1'.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
 first prior to using choco.
Ensuring Chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder
Chocolatey v0.12.1
Upgrading the following packages:
python;visualstudio2019-workload-vctools
By upgrading, you accept licenses for the packages.
python is not installed. Installing...
Progress: Downloading python3 3.10.3... 100%
Progress: Downloading python3 3.10.3... 100%
Progress: Downloading vcredist2015 14.0.24215.20170201... 100%
Progress: Downloading vcredist2015 14.0.24215.20170201... 100%
Progress: Downloading vcredist140 14.31.31103... 100%

Thanks so much.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你不是我要的菜∠ 2025-01-22 22:25:03

您需要包中的 Chocolatey Pro 来检测该软件之前是否通过其他方式安装。


对于免费版本,如果您知道该软件已安装并且希望将来的更新由 Chocolatey 管理,请使用 -n / --skip-powershell 参数choco install 告诉 Chocolatey 运行包的嵌入式 chocolateyInstall.ps1 脚本。这实际上会下载软件包并跳过实际安装,同时允许按照您在升级时的预期安装未来版本。

请注意 --skip-powershell

  • 不会阻止在 choco uninstall 期间发生自动卸载(与 --skip-autouninstall 一起使用>--skip-powershell 为此)
  • 您应该在与您想要正常安装的其他软件包分开的单独命令中安装您想要跳过安装脚本的软件包,因为指定的参数会传递给每个指定的软件包安装。
  • 这种情况并不常见,但某些软件包在导入后升级后可能会出现问题,特别是当软件包不代理 EXE、MSI 或 MSU 安装程序的安装时。某些包脚本也可能会在与之前安装的版本不同的位置进行一些设置或安装。在这些情况下,您可能需要先卸载软件,然后再使用 Chocolatey 进行安装,而不是跳过安装脚本。
    • 这可能表明软件包创建不当,但在某些情况下软件包维护者别无选择。我创建了一些必须手动管理垫片的软件包,这需要运行安装脚本。

You need Chocolatey Pro for the package to detect that the software was previously installed via other means.


With the free version, if you know the software is already installed and you want future updates to be managed by Chocolatey, use the -n / --skip-powershell parameter to choco install to tell Chocolatey not to run the package's embedded chocolateyInstall.ps1 script. This will essentially download the package and skip the actual installation, while allowing future versions to be installed as you would expect on upgrade.

Note that --skip-powershell:

  • Does not prevent auto-uninstall from happening during choco uninstall (use --skip-autouninstall alongside --skip-powershell for this)
  • You should install packages which you want to skip the installation script in a separate command from other packages you do want to install normally, as the specified parameters get passed to every specified package install.
  • This is not a common scenario, but some packages may have issues post-import with upgrading, particularly if the package does not proxy the installation of an EXE, MSI, or MSU installer. Some package scripts may also do some setup or install in a different place than your prior installed version. In these cases you may need to first uninstall the software before installing with Chocolatey, rather than skipping the install script.
    • This may signal a poorly-created package, but there are some scenarios where the package maintainer has no other choice. I've created some packages that must manually manage shims, which requires the install script to run.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文