安装pip时出现错误代码1。在窗户上做体操

2024-05-23 19:37:33 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试图安装和设置健身房复古按照本教程

https://www.youtube.com/watch?v=CFa6NhLgeL0&list=PLTWFMbPFsvz3CeozHfeuJIXWAJMkPtAdS&index=2

但是当我安装-e时。我得到了错误

Command "c:\users\liamp\appdata\local\programs\python\python36\python.exe -c "import setuptools, tokenize;__file__='C:\\Users\\LiamP\\gym-retro\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps" failed with error code 1 in C:\Users\LiamP\gym-retro\

我试图重新更新子模块之前,建设,但没有解决。 我在windows上通过python3.6中的git CMD安装它


Tags: httpsyoutubewwwcode教程openusersfile
1条回答
网友
1楼 · 发布于 2024-05-23 19:37:33

您需要首先安装MSYS2 MinGW 64-bit,如the gym-retro "install from source" documentation中所述:

After you have installed msys2 open an MSYS2 MinGW 64-bit prompt (under Start > MSYS2 64bit) and run this command:

pacman -Sy make mingw-w64-x86_64-gcc

Once that’s done, close the prompt and open a Git CMD prompt (under Start > Git) and run these commands. If you installed MSYS2 into an alternate directory please use that instead of C:\msys64 in the command.

path %PATH%;C:\msys64\mingw64\bin;C:\msys64\usr\bin
set MSYSTEM=MINGW64

之后,您可以在gym retro目录下运行pip3 install -e .。注意,如果已经这样做了,就不需要clone gym-retro。但是,必须在同一终端中执行pathsetpip3 install命令(即不关闭和重新打开)。你知道吗

相关问题 更多 >