I’m trying to use PyCharm with Pylinac. Pylinac is a part of the python packages. My Main.py contains:
from pylinac import Starshot
Starshot.run_demo()
When I run it, I get the errors below. What could it be?
Thank you very much,
Eli
Traceback (most recent call last):
File “C:\Users\eli.furhang\PycharmProjects\pythonProject1\main.py”, line 7, in
from pylinac import Starshot
File “C:\Users\eli.furhang\PycharmProjects\pythonProject1\venv\lib\site-packages\pylinac_init_.py”, line 12, in
from pylinac.ct import CatPhan504, CatPhan600, CatPhan503, CatPhan604
File “C:\Users\eli.furhang\PycharmProjects\pythonProject1\venv\lib\site-packages\pylinac\ct.py”, line 29, in
from .core import image
File “C:\Users\eli.furhang\PycharmProjects\pythonProject1\venv\lib\site-packages\pylinac\core\image.py”, line 20, in
from .utilities import is_close
File “C:\Users\eli.furhang\PycharmProjects\pythonProject1\venv\lib\site-packages\pylinac\core\utilities.py”, line 14, in
from .typing import NumberLike
File “C:\Users\eli.furhang\PycharmProjects\pythonProject1\venv\lib\site-packages\pylinac\core\typing.py”, line 6, in
NumberLike = Union[int, np.float, float]
File “C:\Users\eli.furhang\PycharmProjects\pythonProject1\venv\lib\site-packages\numpy_init_.py”, line 319, in getattr
raise AttributeError(former_attrs[attr])
AttributeError: module ‘numpy’ has no attribute ‘float’.
np.float
was a deprecated alias for the builtin float
. To avoid this error in existing code, use float
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use np.float64
here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Process finished with exit code 1