Closed
Description
When running on a new installation with the latest numpy (1.20.2) i got a crash
Traceback (most recent call last):
File "/usr/local/bin/swift-code-metrics", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/swift_code_metrics/scm.py", line 76, in main
from ._graphs_renderer import GraphsRender
File "/usr/local/lib/python3.9/site-packages/swift_code_metrics/_graphs_renderer.py", line 5, in <module>
from ._graphs_presenter import GraphPresenter
File "/usr/local/lib/python3.9/site-packages/swift_code_metrics/_graphs_presenter.py", line 2, in <module>
from ._graph_helpers import Graph
File "/usr/local/lib/python3.9/site-packages/swift_code_metrics/_graph_helpers.py", line 3, in <module>
import matplotlib.pyplot as plt
File "/usr/local/lib/python3.9/site-packages/matplotlib/__init__.py", line 107, in <module>
from . import _api, cbook, docstring, rcsetup
File "/usr/local/lib/python3.9/site-packages/matplotlib/rcsetup.py", line 26, in <module>
from matplotlib.colors import Colormap, is_color_like
File "/usr/local/lib/python3.9/site-packages/matplotlib/colors.py", line 82, in <module>
from matplotlib import _api, cbook, scale
File "/usr/local/lib/python3.9/site-packages/matplotlib/scale.py", line 18, in <module>
from matplotlib.ticker import (
File "/usr/local/lib/python3.9/site-packages/matplotlib/ticker.py", line 179, in <module>
from matplotlib import transforms as mtransforms
File "/usr/local/lib/python3.9/site-packages/matplotlib/transforms.py", line 43, in <module>
from numpy.linalg import inv
ImportError: cannot import name 'inv' from 'numpy.linalg' (unknown location)
It was fixed by installing numpy 1.19.5
iMac:wine-scanner-ios kasper$ pip3 uninstall numpy
Found existing installation: numpy 1.20.2
Uninstalling numpy-1.20.2:
Would remove:
/usr/local/lib/python3.9/site-packages/numpy-1.20.2.dist-info/*
/usr/local/lib/python3.9/site-packages/numpy/.dylibs/libgcc_s.1.dylib
/usr/local/lib/python3.9/site-packages/numpy/.dylibs/libgfortran.3.dylib
/usr/local/lib/python3.9/site-packages/numpy/.dylibs/libopenblas.0.dylib
/usr/local/lib/python3.9/site-packages/numpy/.dylibs/libquadmath.0.dylib
Proceed (y/n)? y
Successfully uninstalled numpy-1.20.2
iMac:wine-scanner-ios kasper$ pip3 install numpy==1.19.5
Collecting numpy==1.19.5
Downloading numpy-1.19.5-cp39-cp39-macosx_10_9_x86_64.whl (15.6 MB)
|████████████████████████████████| 15.6 MB 5.8 MB/s
Installing collected packages: numpy
Successfully installed numpy-1.19.5
Metadata
Metadata
Assignees
Labels
No labels