简体   繁体   English

PIPX 安装路径更改

[英]PIPX install path change

I have Python installed in c:\users\dan\appdata\roaming\python\python38\python.exe .我在c:\users\dan\appdata\roaming\python\python38\python.exe中安装了 Python 。 pip install is working correctly and I can run Python programs in my IDE. pip install工作正常,我可以在我的 IDE 中运行 Python 程序。 My problem is when I try to install something with pipx I get the following error:我的问题是当我尝试使用pipx安装某些东西时,出现以下错误:

C:\Users\dan>pipx install eth-brownie
No Python at 'c:\users\dan\appdata\local\programs\python\python38\python.exe'
Fatal error from pip prevented installation. Full pip output in file:
    C:\Users\dan\.local\pipx\logs\cmd_2021-11-22_01.21.33_pip_errors.log

Error installing eth-brownie.

I understand pipx seeks python.exe in a wrong directory, but I don't know why because Python were installed to a different location and paths are fine ( PYTHONPATH = C:\Users\dan\AppData\Roaming\Python\Python38 ). I understand pipx seeks python.exe in a wrong directory, but I don't know why because Python were installed to a different location and paths are fine ( PYTHONPATH = C:\Users\dan\AppData\Roaming\Python\Python38 ). My question is that how can make pipx to search python.exe in \appdata\roaming\python\python38\ instead of appdata\local\programs\python\python38\ ?我的问题是如何让pipx\appdata\roaming\python\python38\而不是appdata\local\programs\python\python38\中搜索python.exe

( cmd_2021-11-22_01.21.33_pip_errors.log is not existing in the folder where the error messages points, therefore I couldn't see that log) (错误消息指向的文件夹中不存在cmd_2021-11-22_01.21.33_pip_errors.log ,因此我看不到该日志)

Uninstall pipx with pip uninstall pipx .使用 pip 卸载pipx pip uninstall pipx Then remove the $home/.local/pipx directory completely.然后完全删除$home/.local/pipx目录。 Use get-command pipx in a PowerShell prompt to find out if there are older (and corrupt) copies of pipx installed somewhere.在 PowerShell 提示符中使用get-command pipx来查明是否在某处安装了旧的(和损坏的) pipx副本。 Remove them also.也删除它们。 Then reinstall pipx .然后重新安装pipx

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM