gpt4 book ai didi

linux - cron 找不到命令 pyenv

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:19:05 26 4
gpt4 key购买 nike

我设置了 cron 来访问 python 环境。

pyenv shell ammt-crawler 可以在命令行中找到

这是我的 init.sh 文件

#!/usr/bin/env bash

export PATH="${HOME}/.pyenv/scripts:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

pyenv shell ammt-crawler

但是日志说找不到pyenv命令

./scripts/init.sh: line 4: pyenv: command not found
./scripts/init.sh: line 5: pyenv: command not found
./scripts/init.sh: line 7: pyenv: command not found

问题是什么?

最佳答案

如果在 ubuntu 18.04 中,export PATH=~/.pyenv/shims:~/.pyenv/bin:"$PATH"应该添加到 ~/.profile

关于linux - cron 找不到命令 pyenv,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46291986/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com