如何使用Python访问spoonacular API?

2024-09-29 03:27:37 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图在网站上下载python软件开发工具包,但我不知道如何访问文件夹内容。文档不是很有用

我试图像这样克隆github存储库:How to install spoonacular python package

但当我尝试手动安装软件包时:

$ cd spoonacular-api-clients/python

$ python setup.py 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: '/usr/local/lib/python2.7/dist-packages/test-easy-install-5784.write-test'

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

    /usr/local/lib/python2.7/dist-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.

Tags: installorthetoinyouyourinstallation