[英]Why do I keep getting an error when trying to install "pip install ball" on Mac
(venv) (base) matthewpark@Matthews-MBP game % pip install ball
Collecting ball
Using cached Ball-0.2.9.tar.gz (348 kB)
ERROR: Command errored out with exit status 1:
command: /Users/matthewpark/PycharmProjects/game/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/xg/q1x0qzfn35588jpnk5b253zm0000gn/T/pip-install-smw00u2m/ball/setup.py'"'"'; __file__='"'"'/private/var/folders/xg/q1x0qzfn35588jpnk5b253zm0000gn/T/pip-install-smw00u2m/ball/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/xg/q1x0qzfn35588jpnk5b253zm0000gn/T/pip-pip-egg-info-y5008n2o
cwd: /private/var/folders/xg/q1x0qzfn35588jpnk5b253zm0000gn/T/pip-install-smw00u2m/ball/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/xg/q1x0qzfn35588jpnk5b253zm0000gn/T/pip-install-smw00u2m/ball/setup.py", line 6, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
(venv) (base) matthewpark@Matthews-MBP game %
如何在python中獲得最多的錯誤消息
(venv) (base) matthewpark@Matthews-MBP game % pip install ball
Collecting ball
Using cached Ball-0.2.9.tar.gz (348 kB)
ERROR: Command errored out with exit status 1:
command: /Users/matthewpark/PycharmProjects/game/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/xg/q1x0qzfn35588jpnk5b253zm0000gn/T/pip-install-smw00u2m/ball/setup.py'"'"'; __file__='"'"'/private/var/folders/xg/q1x0qzfn35588jpnk5b253zm0000gn/T/pip-install-smw00u2m/ball/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/xg/q1x0qzfn35588jpnk5b253zm0000gn/T/pip-pip-egg-info-y5008n2o
cwd: /private/var/folders/xg/q1x0qzfn35588jpnk5b253zm0000gn/T/pip-install-smw00u2m/ball/
Complete output (5 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/xg/q1x0qzfn35588jpnk5b253zm0000gn/T/pip-install-smw00u2m/ball/setup.py", line 6, in <module>
import numpy as np
ModuleNotFoundError: No module named 'numpy'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
(venv) (base) matthewpark@Matthews-MBP game %
不幸的是,錯誤消息中最相關的部分在最后。
SystaxError
或TypeError
,這里是ModuleNotFoundError
在您的情況下,解決您的問題的信息是ModuleNotFoundError: No module named 'numpy'
。 在安裝ball
之前,您必須安裝 numpy。
pip install numpy
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.