您当前的位置: 首页 >  git

鱼香ROS

暂无认证

  • 0浏览

    0关注

    498博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

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

鱼香ROS 发布时间:2022-10-15 20:43:51 ,浏览量:0

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, CUDAExtension


def 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 sources


def 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-data
    name="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",
    ],

    # Versioning
    use_scm_version={"root": ".", "relative_to": __file__, "write_to": "grasp_det_seg/_version.py"},

    # Requirements
    setup_requires=["setuptools_scm"],
    python_requires=">=3,             
关注
打赏
1666092100
查看更多评论
0.0822s