没有 pyvenv.cfg 文件

pop*_*oke 4 python pycharm pyvenv

我创建了一个变量cfg = waterot.cfg,然后waterot.cfg在 pycharm 中创建了一个新文件“”,这会自动创建一个pyvenv.cfg文件,我不知道这是什么,我的代码出现错误,我删除了该pyvenv.cfg文件并从 更改.cfg.txt。现在,当我运行代码时出现错误No pyvvenv.cfg file

这是有问题的代码

redeemkey = message.author
if redeemkey.startswith('!download'):
    if message.channel.id == 695834994064490658:
        with open ('waterOT.txt', 'rb') as otcfg:
            await message.author.send(file=discord.File(otcfg, 'waterOT.cfg'))
        await message.delete()
Run Code Online (Sandbox Code Playgroud)

小智 5

就我而言,我尝试了很多方法,但最后我做了一件事来解决我的错误。我只是删除现有的venv目录并从编辑器中 设置Project Interpreter 。PyCharm 编辑器设置