首页 > 解决方案 > 我需要导入 src 库。我用过 pip install src。但会出现错误

问题描述

我正在使用 Colab 笔记本来构建分割模型。我需要导入src库。我用过pip install src。但是使用时出现错误,我已将软件包下载到磁盘上,但我不知道如何将其插入要使用的笔记本上。

错误

Downloading https://files.pythonhosted.org/packages/9a/2b/a6ccfc80af698319c54f00da05f6c798cf72291938893f8bd3f730c2daf9/src-0.0.7.zip
Building wheels for collected packages: src
  Building wheel for src (setup.py) ... error
  ERROR: Failed building wheel for src
  Running setup.py clean for src
Failed to build src
Installing collected packages: src
    Running setup.py install for src ... error
ERROR: Command errored out with exit status 1: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-o7x6uewa/src/setup.py'"'"'; __file__='"'"'/tmp/pip-install-o7x6uewa/src/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-e8u3fix1/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.

标签: python-3.xtensorflowgoogle-colaboratory

解决方案


尝试pip install src==0.0.6

它对我有用


推荐阅读