python-3.x - 我需要导入 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.
解决方案
尝试pip install src==0.0.6
它对我有用
推荐阅读
- react-native - 为什么 hitSlop 在这个嵌套的 TouchableOpacity 组件中不起作用?
- python - 向量和标量之间的元素乘法与两个矩阵
- python - 从父目录导入 .py 文件
- tensorflow - 为什么 flatten() 在 co-lab 中不起作用,而在其他用户发布的 kaggle-notebook 中起作用?
- c# - 在 LINQ 中动态添加左连接/列
- r - 如何突出显示R中列中的值
- python - 如何获取 GitLab 组(python-gitlab)中所有存储库的项目 ID?
- raspberry-pi - 无法使用公共 IP 地址访问树莓派
- javascript - 如何使用正则表达式替换特定符号后的最新字符
- spring-boot - Spring Path 变量 Url 发送百分比符号