简体   繁体   English

突然无法安装包到 pycharm? (从 Pipfile.lock 错误安装依赖项?)

[英]suddenly can't install packages to pycharm? (Installing dependencies from Pipfile.lock error?)

Error is posted here as pastebin, it's very long错误在这里发布为 pastebin,它很长

'''https://pastebin.com/8ssgGNdL'''

(edit paste bin expired) https://pastebin.com/BRuPeifp (编辑粘贴箱已过期) https://pastebin.com/BRuPeifp

I've since tried installing packages using pip3 and still get similar results.我已经尝试使用 pip3 安装软件包,但仍然得到类似的结果。 I haven't changed anything since the last time I installed 'requests'自上次安装“请求”以来,我没有更改任何内容

I'm sorry if i'm asking an annoying question.如果我问了一个烦人的问题,我很抱歉。 I've googled similar questions but nothing seems to help.我用谷歌搜索了类似的问题,但似乎没有任何帮助。 If anyone can point me in the right place to look and solve this for my self I will be very grateful.如果有人能指出我在正确的地方为我自己寻找和解决这个问题,我将非常感激。

The error states:错误指出:

fatal error: 'SDL.h' file not found致命错误:找不到“SDL.h”文件

and

For help with compilation see:', ' https://www.pygame.org/wiki/MacCompile '有关编译的帮助,请参见:'、' https://www.pygame.org/wiki/MacCompile '

It looks like one or more of the SDL dependencies is missing.看起来缺少一个或多个 SDL 依赖项。

Have you installed SDL dependencies mentioned on that page using HomeBrew?您是否使用 HomeBrew 安装了该页面上提到的 SDL 依赖项?

It seems like it's crashing while installing PyGame.安装 PyGame 时似乎崩溃了。 According the PyGame's Getting Started page there seems to be some issues with newer version of OS X.根据 PyGame 的 入门页面,较新版本的 OS X 似乎存在一些问题。

Quoting from the page:从页面引用:

If your examples aren't running and you are using a recent version of Mac OS X;如果您的示例没有运行并且您使用的是最新版本的 Mac OS X; try this line to install pygame instead:试试这条线来安装 pygame 代替:

python3 -m pip install -U pygame==2.0.0.dev6 --user python3 -m pip install -U pygame==2.0.0.dev6 --user

Also looking over the Internet, the problem might be because of Python3.8 itself, and therefore requiring a newer version to resolve the issue.又上网查了一下,问题可能是Python3.8本身的问题,所以需要更新的版本来解决问题。

~ Solved ~ ~ 解决了 ~

pygame doesn't work with python3.8 so I had to use: pygame 不适用于 python3.8 所以我不得不使用:

pipenv install pygame==2.0.0.dev6

when testing by trying to install other packages such as requests, I was met with the same error.通过尝试安装其他软件包(例如请求)进行测试时,我遇到了同样的错误。 This error was infact the error for pygame repeating itself (I don't understand why)这个错误实际上是 pygame 重复自身的错误(我不明白为什么)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM