setuptools-scm was unable to detect version for'…/…/某git包'

鱼香ROS介绍:

鱼香ROS是由机器人爱好者共同组成的社区,欢迎一起参与机器人技术交流。
进群加V:fishros2048

文章信息:

标题:setuptools-scm was unable to detect version for'…/…/某git包'
原文地址:https://fishros.org.cn/forum/topic/81
关键词:
参与者: 904048425,小鱼,
版权声明: 文章中所有知识产权归鱼香ROS及原作者所有。


1. 904048425看着代码说:

你好小鱼,我在安装好的pytorch环境下按照readme运行了在github上下载的一个程序包,还没运行起来就卡在了第一步,运行setup.py install 时出现如下错误

LookupError: setuptools-scm was unable to detect version for '/home/wxy/mypython/grasp_det_seg_cnn'.Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.

困住了我两天了,在网上查找原因少之又少,应该是setuptools-scm获取python version的问题,奈何自己学识尚浅,不会修改,烦请小鱼帮忙看一下。我得设备版本如下:

ubuntu:18.04
python:3.9
pytorch:1.11.0
cuda:10.1
setuptools:33.1.1
setuptools:1.15.0

其中,git包文件如下:
setup.py

from os import path, listdir
import setuptools
from torch.utils.cpp_extension import BuildExtension, CUDAExtensiondef find_sources(root_dir):sources = []for file in listdir(root_dir):_, ext = path.splitext(file)if ext in [".cpp", ".cu"]:sources.append(path.join(root_dir, file))return sourcesdef make_extension(name, package):return CUDAExtension(name="{}.{}._backend".format(package, name),sources=find_sources(path.join("src", name)),extra_compile_args={"cxx": ["-O3"],"nvcc": ["--expt-extended-lambda"],},include_dirs=["include/"],)here = path.abspath(path.dirname(__file__))with open(path.join(here, "README.md"), encoding="utf-8") as f:long_description = f.read()setuptools.setup(# Meta-dataname="GraspDetSeg_CNN",author="Stefan Ainetter",author_email="stefan.ainetter@icg.tugraz.at",description="Grasp Detection and Segmentation for Pytorch, code based on Seamless Scene Segmentation (https://github.com/mapillary/seamseg).",long_description_content_type="text/markdown",url="",classifiers=["Programming Language :: Python :: 3","Programming Language :: Python :: 3.4","Programming Language :: Python :: 3.5","Programming Language :: Python :: 3.6","Programming Language :: Python :: 3.7",],# Versioninguse_scm_version={"root": ".", "relative_to": __file__, "write_to": "grasp_det_seg/_version.py"},# Requirementssetup_requires=["setuptools_scm"],python_requires=">=3, <4",# Package descriptionpackages=["grasp_det_seg","grasp_det_seg.algos","grasp_det_seg.config","grasp_det_seg.data_OCID","grasp_det_seg.models","grasp_det_seg.modules","grasp_det_seg.modules.heads","grasp_det_seg.utils","grasp_det_seg.utils.bbx","grasp_det_seg.utils.nms","grasp_det_seg.utils.parallel","grasp_det_seg.utils.roi_sampling",],ext_modules=[make_extension("nms", "grasp_det_seg.utils"),make_extension("bbx", "grasp_det_seg.utils"),make_extension("roi_sampling", "grasp_det_seg.utils")],cmdclass={"build_ext": BuildExtension},include_package_data=True,
)

_version.py

# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
version = '0.1.dev0'
version_tuple = (0, 1, 'dev0')

init.py

from ._version import version as __version__

麻烦小鱼抽空看一下,感激不尽!



2. 小鱼笑嘻嘻的说:

@904048425 别点名让我回答哇⊙∀⊙!不然小鱼累死也回答不完

setuptools-scm was unable to detect version for‘…/…/某git包‘相关推荐

  1. NDK断点无法调试Unable to detect application ABI's

    进行断点NDK断点调试的时候报错:   Unable to detect application ABI's 历经千辛万苦,终于可以ndk断点调试 1.ADT->Preference->A ...

  2. NuGet Error:Unable to find version ‘0.3.3.0‘ of package ‘glog.overlay-x64_v120_Release_dynamic‘.

    问题: 使用VS2013生成caffe解决方案时,报错NuGet Error:Unable to find version '0.3.3.0' of package 'glog.overlay-x64 ...

  3. Android NDK调试出错Unknown Application ABI, Unable to detect application ABI#39;s的解决方式...

    今天在调试Android NDK的时候,ADT的控制台报了这个错误: Unknown Application ABI, Unable to detect application ABI's 在网上查了 ...

  4. Qt运行提示QGtkStyle was unable to detect the current GTK+ theme.解决方法

    在ubuntu上安装完Qt之后出现 QGtkStyle was unable to detect the current GTK+ theme. 原因是Qt没有成功的加载Ubuntu的主题,因此解决方 ...

  5. QGtkStyle was unable to detect the current GTK+ theme

      gtk开发的桌面运行qt的程序有时会报这个错: 代码: QGtkStyle was unable to detect the current GTK+ theme 解决方法: 代码: # gcon ...

  6. linux安装pycharm报错:Unable to detect graphics environment

    执行 sh pycharm.sh 时,报错: Startup Error Unable to detect graphics environment 解决方法: 重新开启一个终端(这个时候是默认以用户 ...

  7. Unable to retrieve version information from Elasticsearch nodes.

    今天在自己本地测试启动ElasticSearch和Kibana时,ElasticSearch已经启动的情况下,去启动Kibana时,报:Unable to retrieve version infor ...

  8. [MobaXterm] Unable to detect graphics environment

    报错日志 [MobaXterm] Unable to detect graphics environment ~/workspace/share/android-studio/bin$ ./studi ...

  9. unable to access ‘https://github.com/***.git‘: OpenSSL SSL_read: Connection was reset, errno 10054

    Git提交项目报错: unable to access 'https://github.com/***.git': OpenSSL SSL_read: Connection was reset, er ...

最新文章

  1. python程序代码是什么_python编程:下列代码表示什么含义
  2. 动物克隆技术应用价值_虽然有了克隆技术为什么要进行克隆呢
  3. swiper轮播插件的使用
  4. mysql xml语句_Mysql语句
  5. 作者:方世清,男,现为中国神华神皖能源有限责任公司副总经理、高级工程师。...
  6. 力扣106. 从中序与后序遍历序列构造二叉树(JavaScript)
  7. POP3协议学习笔记
  8. 每日自增字段mysql_2020-11-05 触发器实现mysql每日自增字段
  9. JMeter之压力测试
  10. 《thor过滤器 thor过滤规则合集资源》500+
  11. Windows下搭建kms激活服务器
  12. Redis集群之主从模式
  13. 世界上最好用的FTP服务器管理工具
  14. linux打开txt文件命令_「linux命令详解」lsof命令解析,教你一步打开所有文件
  15. 金蝶EAS_WFLL2开发记录
  16. 巴菲特致股东的一封信:2005年
  17. np.array与np.ndarray的区别
  18. cadence SPB17.4 capture and cis 全部错误消息列表
  19. ## IDEA创建maven项目没有src目录问题解决
  20. e3是合法浮点数吗_下面四个选项中,均是不合法的浮点数的选项是

热门文章

  1. pubwin修改服务器时间,如何解决控制台打开(Pubwin)提示服务器没有启动或者服务器IP地址改变问题...
  2. 交通流量预测数据集解读
  3. office的最佳快捷键——快速访问工具栏
  4. C++的游戏--贪吃蛇
  5. R语言笔记-分类变量列联表和独立性检验
  6. php解压有密码的压缩包,linux下解压有密码的rar压缩包
  7. java随机生成数字和字母_使用java如何生成随机的字母数字字符串?
  8. PyTorch非线性函数拟合
  9. python基础-文本对齐(居中,左对齐,右对齐)
  10. python饿了么商家开放平台模拟网页http请求实战