简体   繁体   English

如果通过自制软件安装了 python 和 pygame,那么 mac 上的 pygame 文件夹在哪里?

[英]Where is pygame folder on mac if installed python and pygame via homebrew?

I used this tutorial here.在这里使用了本教程 for pygame istallation on mac.用于 mac 上的 pygame 安装。 The tutorial is good and I installed it all using hombrew - git, mercurial, sgl dependencies and python, pygame.该教程很好,我使用 hombrew 安装了它 - git、mercurial、sql 依赖项和 python、pygame。

The instructions were like this.指示是这样的。

brew install git
brew install sdl sdl_image sdl_mixer sdl_ttf portmidi
pip3 install hg+http://bitbucket.org/pygame/pygame
python3

At the prompt, type:在提示符下,键入:

import pygame

In terminal, i do import pygame, pygame.init() and it works, but how do I launch it through IDE?在终端中,我确实import pygame, pygame.init()并且它可以工作,但是如何通过 IDE 启动它? The terminal just sits there, no any other program/IDE launches after init command.终端就在那里,在 init 命令之后没有任何其他程序/IDE 启动。

Where did homebrew install all those folders? homebrew 在哪里安装了所有这些文件夹? I can't find them in my applications, documents.我在我的申请、文件中找不到它们。

I need to know where pygame files are placed, so that I can somehow connect it to other custom IDE - PyCharm etc.我需要知道 pygame 文件的放置位置,以便我可以以某种方式将它连接到其他自定义 IDE - PyCharm 等。

What should serve as IDE in my case?在我的情况下,什么应该作为 IDE? probably xCode, because the tutorial mentions it?可能是 xCode,因为教程提到了它?

After installing with homebrew, pygame seems to be connected to my other IDEs just fine.使用自制软件安装后,pygame 似乎可以很好地连接到我的其他 IDE。 I use pycharm, and I didn't have to do anything to get pygame working with it.我使用 pycharm,我不需要做任何事情就可以让 pygame 使用它。 However, out of my own curiosity, after much searching, I found this folder:然而,出于我自己的好奇,经过多次搜索,我找到了这个文件夹:

/usr/local/lib/python3.5/site-packages/pygame /usr/local/lib/python3.5/site-packages/pygame

您可以运行 from pygame import jgsjfgjsdnfjg 来查找,它会包含在错误消息中。

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

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