为什么它说我没有管理员权限安装ChatterBot?

huangapple go评论144阅读模式
英文:

why it says I don't have admin privilage to install chatterbot?

问题

我尝试在我最新的Python上安装chatterbot,但pip无法工作,包括以管理员身份运行和其他我不记得的所有操作。

所以我去了这里:

C:\Users\ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\

通过CMD,并进行了git克隆操作,然后chatterbot文件夹神奇地出现了。所以我成功地运行了pip install -U setuptools,然后尝试了这个:python setup.py install

你猜怎么着?

C:\Users\ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\ChatterBot>python setup.py install
C:\Users\ali\AppData\Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/setuptools/config/setupcfg.py:516: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
running install
C:\Users\ali\AppData\Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
C:\Users\ali\AppData/Local/Packages/PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0/LocalCache/local-packages/Python311/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
error: 无法在安装目录中创建或删除文件

尝试添加或删除文件时出现以下错误:

[Errno 13] 拒绝许可:'C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64__qbz5n2kfra8p0\Lib\site-packages\test-easy-install-3476.write-test'

您指定的安装目录(通过--install-dir、--prefix或distutils默认设置)是:

C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64__qbz5n2kfra8p0\Lib\site-packages\

也许您的帐户没有写入此目录的权限?如果安装目录是系统拥有的目录,您可能需要以管理员或“root”帐户登录。如果您没有对此计算机的管理员访问权限,建议选择不同的安装目录,最好是列在PYTHONPATH环境变量中的一个。

关于其他选项的信息,您可以参考文档:

https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

请根据您的系统进行适当更改,然后重试。

我确信我以管理员身份运行了。证据:

C:\Users\ali\AppData\Local/Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\ChatterBot>net user ali
User name ali
Full Name
Comment
User's comment
Country/region code 000 (System Default)
Account active Yes
Account expires Never

Password last set 2022-11-21 12:48:19 AM
Password expires Never
Password changeable 2022-11-21 12:48:19 AM
Password required No
User may change password Yes

Workstations allowed All
Logon script
User profile
Home directory
Last logon 2023-03-06 09:34:35 AM

Logon hours allowed All

Local Group Memberships *Administrators
Global Group memberships *None
The command completed successfully.

为什么不能通过一次点击或其他方式自动修复?

英文:

I tried to install chatterbot on my up to date python, pip didn't work, everything including running as administrator and every other thing that I don't remember.

so I went to here:

C:\Users\ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\

with CMD, and did a git clone thing and a chatterbot folder magically appeared. so I did a pip install -U setuptools succesfully and tried this: python setup.py install

and guess what?

C:\Users\ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\ChatterBot>python setup.py install
C:\Users\ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\setuptools\config\setupcfg.py:516: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
  warnings.warn(msg, warning_class)
running install
C:\Users\ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
C:\Users\ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\test-easy-install-3476.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.752.0_x64__qbz5n2kfra8p0\Lib\site-packages\

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

Please make the appropriate changes for your system and try again.

I am sure that I had run with admin thing. proof:

    C:\Users\ali\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\ChatterBot>net user ali
User name                    ali
Full Name
Comment
User's comment
Country/region code          000 (System Default)
Account active               Yes
Account expires              Never

Password last set            2022-11-21 12:48:19 AM
Password expires             Never
Password changeable          2022-11-21 12:48:19 AM
Password required            No
User may change password     Yes

Workstations allowed         All
Logon script
User profile
Home directory
Last logon                   2023-03-06 09:34:35 AM

Logon hours allowed          All

Local Group Memberships      *Administrators
Global Group memberships     *None
The command completed successfully.

why doesn't it get fixed automatically with one click or something?

答案1

得分: 0

pip install chatterbot==1.0.4

it's fixed. thanks for help.

英文:
pip install chatterbot==1.0.4

it's fixed. thanks for help.

huangapple
  • 本文由 发表于 2023年3月7日 02:23:36
  • 转载请务必保留本文链接:https://go.coder-hub.com/75654478.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定