Python文件打开,然后立即关闭

时间:2020-08-01 00:54:22

标签: python api python-3.8 interactive-brokers

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

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

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.

1 个答案:

答案 0 :(得分:1)

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