使用自制软件安装Pygame时,Pip3错误1

时间:2019-01-31 09:38:34

标签: python pip pygame

我正在尝试为Pyhton3.7下载并安装Pygame,以便可以使用这些库。我正在使用自制软件,在需要使用pip的最后一步,我得到一个黄色错误,说我不拥有目录,最后遇到pip错误1。然后我使用-H标记sudo来解决该错误,如错误本身所建议的那样,但是错误1仍然存在。

我正在使用自制软件,并且在最后一个需要使用pip的步骤上,出现黄色错误,提示我不拥有目录,最后我遇到pip错误1。然后使用-H标记sudo来解决该错误,如错误本身所建议的那样,但是错误1仍然存在。

我运行的第一个命令是

sudo pip3 install hg+http://bitbucket.org/pygame/pygame

先返回此错误,然后最后返回错误

The directory '/Users/lucashmg/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/lucashmg/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

然后我用-H标志运行了

sudo -H pip3 install hg+http://bitbucket.org/pygame/pygame

然后我又遇到了错误1,但另一个消失了,并出现了新的错误

 Failed building wheel for pygame
  Running setup.py clean for pygame
Failed to build pygame
Installing collected packages: pygame
  Running setup.py install for pygame ... error
 Command "/usr/local/opt/python/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/private/tmp/pip-req-build-q40nmm1p/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/tmp/pip-record-cuthlxms/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/tmp/pip-req-build-q40nmm1p/

0 个答案:

没有答案