Python 文件打开然后立即关闭

Python file opens then immediately closes

所以我正在尝试为 python 下载 Interactive Brokers API。我已经按照网站的指示下载了 api,然后我去了源代码,python 客户端,然后当我打开设置 python 文件时,该文件将打开一个小黑屏然后立即关闭。我正在使用 python 3.8。任何人都知道为什么会发生这种情况(我已经在下面添加了我现在收到的错误)?谢谢

编辑: 当我在命令提示符中键入“C:\TWS API\source\pythonclient”,然后 python setup.py 安装时,出现错误:

running install
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.7_3.7.2288.0_x64__qbz5n2kfra8p0\Lib\site-packages\test-easy-install-13760.write-test'

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

    C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.7_3.7.2288.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.readthedocs.io/en/latest/easy_install.html

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

您必须进入 cmd 并转到存储 API 文件的目录,然后键入 python setup.py install 这是假设您已安装 python。使用 cd 导航到文件位置。