You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to run code with simple numpy functions, the code does not want to run and has an error with numpy
Traceback
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\plugins\application\container.py", line 492, in _compute_dependencies
dependencies.declare_dependencies()
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 458, in declare_dependencies
add(dep['modname'], dep['package_name'],
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 389, in addDEPENDENCIES+= [Dependency(modname, package_name, features,
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 331, in __init__self.installed_version = programs.get_module_version(modname)
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\utils\programs.py", line 839, in get_module_version
mod =__import__(module_name)
File "C:\Users\stasi\anaconda3\Lib\site-packages\matplotlib\__init__.py", line 161, in <module>from . import _api, _version, cbook, _docstring, rcsetup
File "C:\Users\stasi\anaconda3\Lib\site-packages\matplotlib\rcsetup.py", line 27, in <module>from matplotlib.colors import Colormap, is_color_like
File "C:\Users\stasi\anaconda3\Lib\site-packages\matplotlib\colors.py", line 57, in <module>from matplotlib import _api, _cm, cbook, scale
File "C:\Users\stasi\anaconda3\Lib\site-packages\matplotlib\scale.py", line 22, in <module>from matplotlib.ticker import (
File "C:\Users\stasi\anaconda3\Lib\site-packages\matplotlib\ticker.py", line 143, in <module>from matplotlib import transforms as mtransforms
File "C:\Users\stasi\anaconda3\Lib\site-packages\matplotlib\transforms.py", line 49, in <module>from matplotlib._path import (
Traceback (most recent call last):
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\numpy\core\_multiarray_umath.py", line 44, in __getattr__raiseImportError(msg)
ImportError:
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\plugins\application\container.py", line 492, in _compute_dependencies
dependencies.declare_dependencies()
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 458, in declare_dependencies
add(dep['modname'], dep['package_name'],
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 389, in addDEPENDENCIES+= [Dependency(modname, package_name, features,
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 331, in __init__self.installed_version = programs.get_module_version(modname)
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\utils\programs.py", line 839, in get_module_version
mod =__import__(module_name)
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\__init__.py", line 39, in <module>from pandas.compat import (
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\compat\__init__.py", line 27, in <module>from pandas.compat.pyarrow import (
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\compat\pyarrow.py", line 8, in <module>import pyarrow as pa
File "C:\Users\stasi\anaconda3\Lib\site-packages\pyarrow\__init__.py", line 65, in <module>import pyarrow.lib as _lib
Traceback (most recent call last):
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\numpy\core\_multiarray_umath.py", line 44, in __getattr__raiseImportError(msg)
ImportError:
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\plugins\application\container.py", line 492, in _compute_dependencies
dependencies.declare_dependencies()
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 458, in declare_dependencies
add(dep['modname'], dep['package_name'],
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 389, in addDEPENDENCIES+= [Dependency(modname, package_name, features,
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 331, in __init__self.installed_version = programs.get_module_version(modname)
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\utils\programs.py", line 839, in get_module_version
mod =__import__(module_name)
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\__init__.py", line 62, in <module>from pandas.core.api import (
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\api.py", line 9, in <module>from pandas.core.dtypes.dtypes import (
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\dtypes\dtypes.py", line 24, in <module>from pandas._libs import (
File "C:\Users\stasi\anaconda3\Lib\site-packages\pyarrow\__init__.py", line 65, in <module>import pyarrow.lib as _lib
Traceback (most recent call last):
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\numpy\core\_multiarray_umath.py", line 44, in __getattr__raiseImportError(msg)
ImportError:
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\plugins\application\container.py", line 492, in _compute_dependencies
dependencies.declare_dependencies()
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 458, in declare_dependencies
add(dep['modname'], dep['package_name'],
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 389, in addDEPENDENCIES+= [Dependency(modname, package_name, features,
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 331, in __init__self.installed_version = programs.get_module_version(modname)
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\utils\programs.py", line 839, in get_module_version
mod =__import__(module_name)
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\__init__.py", line 62, in <module>from pandas.core.api import (
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\api.py", line 28, in <module>from pandas.core.arrays import Categorical
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\arrays\__init__.py", line 1, in <module>from pandas.core.arrays.arrow import ArrowExtensionArray
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\arrays\arrow\__init__.py", line 5, in <module>from pandas.core.arrays.arrow.array import ArrowExtensionArray
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\arrays\arrow\array.py", line 50, in <module>from pandas.core import (
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\ops\__init__.py", line 8, in <module>from pandas.core.ops.array_ops import (
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\ops\array_ops.py", line 56, in <module>from pandas.core.computation import expressions
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\computation\expressions.py", line 21, in <module>from pandas.core.computation.check importNUMEXPR_INSTALLED
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\computation\check.py", line 5, in <module>
ne = import_optional_dependency("numexpr", errors="warn")
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\compat\_optional.py", line 135, in import_optional_dependency
module = importlib.import_module(name)
File "C:\Users\stasi\anaconda3\Lib\importlib\__init__.py", line 90, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\stasi\anaconda3\Lib\site-packages\numexpr\__init__.py", line 24, in <module>from numexpr.interpreter importMAX_THREADS, use_vml, __BLOCK_SIZE1__AttributeError: _ARRAY_API not found
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
Traceback (most recent call last): File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\plugins\application\container.py", line 492, in _compute_dependencies
dependencies.declare_dependencies()
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 458, in declare_dependencies
add(dep['modname'], dep['package_name'],
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 389, in addDEPENDENCIES+= [Dependency(modname, package_name, features,
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\dependencies.py", line 331, in __init__self.installed_version = programs.get_module_version(modname)
File "C:\Users\stasi\anaconda3\Lib\site-packages\spyder\utils\programs.py", line 839, in get_module_version
mod =__import__(module_name)
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\__init__.py", line 62, in <module>from pandas.core.api import (
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\api.py", line 28, in <module>from pandas.core.arrays import Categorical
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\arrays\__init__.py", line 1, in <module>from pandas.core.arrays.arrow import ArrowExtensionArray
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\arrays\arrow\__init__.py", line 5, in <module>from pandas.core.arrays.arrow.array import ArrowExtensionArray
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\arrays\arrow\array.py", line 64, in <module>from pandas.core.arrays.masked import BaseMaskedArray
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\arrays\masked.py", line 60, in <module>from pandas.core import (
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\core\nanops.py", line 52, in <module>
bn = import_optional_dependency("bottleneck", errors="warn")
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\pandas\compat\_optional.py", line 135, in import_optional_dependency
module = importlib.import_module(name)
File "C:\Users\stasi\anaconda3\Lib\importlib\__init__.py", line 90, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\stasi\anaconda3\Lib\site-packages\bottleneck\__init__.py", line 7, in <module>from .move import (move_argmax, move_argmin, move_max, move_mean, move_median,
Traceback (most recent call last):
File "C:\Users\stasi\AppData\Roaming\Python\Python312\site-packages\numpy\core\_multiarray_umath.py", line 44, in __getattr__raiseImportError(msg)
ImportError:
A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.1.1 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.
This is likely an issue with the Anaconda installation. You have numpy 2.1.1 in your base Anaconda Python environment but Anaconda have not updated numpy in their base Python environment to that version yet. It should be at version 1.26.4 according to the 2024.06-1 Anaconda Release Notes. Therefore it is likely that you have been installing community conda-forge channel packages into the base Anaconda Python environment which normally results in an unstable base environment...
The commercial channel anaconda is a limited set of packages, repackaged by Anaconda for use in their Anaconda base Python environment. The Anaconda base Python environment should generally be used "as is" with limited updates to the conda package manager and anaconda-navigator until the standalone installer is updated by Anaconda. Installation of community channel conda-forge packages into the base Python environment, generally results in instabilities.
You should uninstall Anaconda and reinstall Anaconda if you want to use base "as is". Alternatively if you want to use the latest version of Spyder, install Spyder using the standalone installer.
If you need to use a custom set of packages you can create a custom conda-forge Python environment with spyder-kernels. To create a custom conda-forge environment you will need to install Miniconda or Anaconda. Miniconda is a minimal version of Anaconda and can be used if you do not plan to use the base Python environment for other purposes. The following Python environment for example can be used for seaborn:
Description
What steps will reproduce the problem?
When I try to run code with simple numpy functions, the code does not want to run and has an error with numpy
Traceback
Versions
Dependencies
The text was updated successfully, but these errors were encountered: