Tracktor代码win10上的环境配置

本文介绍了如何在Windows 10上使用conda创建新环境,并详细讲述了在安装Tracktor过程中遇到的lap、lapsolver、sacred等依赖库的安装问题及其解决方案,包括从不同源下载安装包、处理import sacred错误,以及配置git以解决python调用git的问题。此外,还提到了在virtualenv和PyCharm中运行Tracktor的相关设置调整。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

  1. conda中创建新环境
  2. 按照requirements.txt安装包,遇到错误的先删掉
    安装lap和lapsolver时遇到错误
 ERROR: Could not find a version that satisfies the requirement pytest-runner (from versions: none)
 ERROR: No matching distribution found for pytest-runner

lap用conda清华源安装了,lapsolver从pypi网站下载whl的win32版本pip安装好了
4. import sacred 出错

ImportError: Failed to initialize: Bad git executable.
The git executable must be specified in one of the following ways:
    - be included in your $PATH
    - be set via $GIT_PYTHON_GIT_EXECUTABLE
    - explicitly set via git.refresh()

All git commands will error until this is rectified.

This initial warning can be silenced or aggravated in the future by setting the
$GIT_PYTHON_REFRESH environment variable. Use one of the following values:
    - quiet|q|silence|s|none|n|0: for no warning or exception
    - warn|w|warning|1: for a printed warning
    - error|e|raise|r|2: for a raised exception

Example:
    export GIT_PYTHON_REFRESH=quiet

下载git安装,在 https://npm.taobao.org/mirrors/git-for-windows/ 下载更快,官网很慢,一直next安装好了之后,打开git bash配置
在这里插入图片描述
在虚拟环境中运行这一指令让python调用git

set GIT_PYTHON_GIT_EXECUTABLE=C:\Program Files\Git\cmd\git.exe

这个问题就能解决
6. virtualenv中的pip install -e . 等价于python setup.py develop,用这句install tracktor
7. test_tracktor.py就可以运行了
8. 用pycharm直接运行的话,运行根目录不对。
在run/run/edit 设置里 configures/working directory 更改目录

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值