-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem with Numpy version compatibility #23489
Comments
Hey @Alicia-Jackson, thanks for reporting. This problem is caused by installing Numpy, or a package that depends on it, with pip in a conda environment. Since pip and conda packages are binary incompatible, they can't be mixed in the same environment. To solve it, you need to remove this directory
Let us know if that works for you. And if you want to learn more about this problem, check our our video about it. |
Hi Carlos,
Thanks for looking into my issue. I renamed this directory, and I am not seeing the pop up window with error any more which is a good sign.
However pandas seems to have broken, I tried updating it with Conda in Anaconda prompt and not getting anywhere with it
(base) C:\Users\ahong>conda remove pandas
Traceback (most recent call last):
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\exceptions.py", line 1082, in __call__
return func(*args, **kwargs)
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\cli\main.py", line 87, in _main
exit_code = do_call(args, p)
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 82, in do_call
module = import_module(relative_mod, __name__.rsplit('.', 1)[0])
File "C:\Users\ahong\Anaconda3\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\cli\main_update.py", line 8, in <module>
from .install import install
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\cli\install.py", line 19, in <module>
from ..core.index import calculate_channel_urls, get_index
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\core\index.py", line 13, in <module>
from .package_cache_data import PackageCacheData
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 14, in <module>
from .path_actions import CacheUrlAction, ExtractPackageAction
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\core\path_actions.py", line 29, in <module>
from ..gateways.connection.download import download
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\gateways\connection\download.py", line 14, in <module>
from .session import CondaSession
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\gateways\connection\session.py", line 13, in <module>
from .adapters.s3 import S3Adapter
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\gateways\connection\adapters\s3.py", line 12, in <module>
import boto3
File "C:\Users\ahong\Anaconda3\lib\site-packages\boto3\__init__.py", line 17, in <module>
from boto3.session import Session
File "C:\Users\ahong\Anaconda3\lib\site-packages\boto3\session.py", line 17, in <module>
import botocore.session
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\session.py", line 26, in <module>
import botocore.client
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\client.py", line 15, in <module>
from botocore import waiter, xform_name
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\waiter.py", line 18, in <module>
from botocore.docs.docstring import WaiterDocstring
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\docs\__init__.py", line 15, in <module>
from botocore.docs.service import ServiceDocumenter
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\docs\service.py", line 14, in <module>
from botocore.docs.client import (
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\docs\client.py", line 18, in <module>
from botocore.docs.example import ResponseExampleDocumenter
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\docs\example.py", line 13, in <module>
from botocore.docs.shape import ShapeDocumenter
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\docs\shape.py", line 19, in <module>
from botocore.utils import is_json_value_header
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\utils.py", line 39, in <module>
import botocore.httpsession
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\httpsession.py", line 45, in <module>
from urllib3.contrib.pyopenssl import (
File "C:\Users\ahong\Anaconda3\lib\site-packages\urllib3\contrib\pyopenssl.py", line 43, in <module>
import OpenSSL.SSL # type: ignore[import-untyped]
File "C:\Users\ahong\Anaconda3\lib\site-packages\OpenSSL\__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "C:\Users\ahong\Anaconda3\lib\site-packages\OpenSSL\crypto.py", line 1579, in <module>
class X509StoreFlags(object):
File "C:\Users\ahong\Anaconda3\lib\site-packages\OpenSSL\crypto.py", line 1598, in X509StoreFlags
NOTIFY_POLICY = _lib.X509_V_FLAG_NOTIFY_POLICY
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\ahong\Anaconda3\Scripts\conda-script.py", line 12, in <module>
sys.exit(main())
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\cli\main.py", line 155, in main
return conda_exception_handler(_main, *args, **kwargs)
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\exceptions.py", line 1374, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs)
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\exceptions.py", line 1085, in __call__
return self.handle_exception(exc_val, exc_tb)
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\exceptions.py", line 1129, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb)
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\exceptions.py", line 1140, in handle_unexpected_exception
self.print_unexpected_error_report(error_report)
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\exceptions.py", line 1210, in print_unexpected_error_report
from .cli.main_info import get_env_vars_str, get_main_info_str
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\cli\main_info.py", line 19, in <module>
from ..core.index import _supplement_index_with_system
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\core\index.py", line 13, in <module>
from .package_cache_data import PackageCacheData
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 14, in <module>
from .path_actions import CacheUrlAction, ExtractPackageAction
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\core\path_actions.py", line 29, in <module>
from ..gateways.connection.download import download
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\gateways\connection\download.py", line 14, in <module>
from .session import CondaSession
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\gateways\connection\session.py", line 13, in <module>
from .adapters.s3 import S3Adapter
File "C:\Users\ahong\Anaconda3\lib\site-packages\conda\gateways\connection\adapters\s3.py", line 12, in <module>
import boto3
File "C:\Users\ahong\Anaconda3\lib\site-packages\boto3\__init__.py", line 17, in <module>
from boto3.session import Session
File "C:\Users\ahong\Anaconda3\lib\site-packages\boto3\session.py", line 17, in <module>
import botocore.session
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\session.py", line 26, in <module>
import botocore.client
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\client.py", line 15, in <module>
from botocore import waiter, xform_name
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\waiter.py", line 18, in <module>
from botocore.docs.docstring import WaiterDocstring
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\docs\__init__.py", line 15, in <module>
from botocore.docs.service import ServiceDocumenter
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\docs\service.py", line 14, in <module>
from botocore.docs.client import (
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\docs\client.py", line 18, in <module>
from botocore.docs.example import ResponseExampleDocumenter
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\docs\example.py", line 13, in <module>
from botocore.docs.shape import ShapeDocumenter
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\docs\shape.py", line 19, in <module>
from botocore.utils import is_json_value_header
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\utils.py", line 39, in <module>
import botocore.httpsession
File "C:\Users\ahong\Anaconda3\lib\site-packages\botocore\httpsession.py", line 45, in <module>
from urllib3.contrib.pyopenssl import (
File "C:\Users\ahong\Anaconda3\lib\site-packages\urllib3\contrib\pyopenssl.py", line 43, in <module>
import OpenSSL.SSL # type: ignore[import-untyped]
File "C:\Users\ahong\Anaconda3\lib\site-packages\OpenSSL\__init__.py", line 8, in <module>
from OpenSSL import crypto, SSL
File "C:\Users\ahong\Anaconda3\lib\site-packages\OpenSSL\crypto.py", line 1579, in <module>
class X509StoreFlags(object):
File "C:\Users\ahong\Anaconda3\lib\site-packages\OpenSSL\crypto.py", line 1598, in X509StoreFlags
NOTIFY_POLICY = _lib.X509_V_FLAG_NOTIFY_POLICY
AttributeError: module 'lib' has no attribute 'X509_V_FLAG_NOTIFY_POLICY'
The Anaconda Navigator doesn’t want to open so I can use the package manager in there. Is there any suggestion for this error?
Before the last resort of uninstalling Anaconda and reinstalling I just want to see if there is anything I should try.
Thanks
Best,
Alicia
From: Carlos Cordoba ***@***.***>
Sent: Thursday, January 16, 2025 1:02 PM
To: spyder-ide/spyder ***@***.***>
Cc: Hong, Alicia ***@***.***>; Mention ***@***.***>
Subject: [EXTERNAL] Re: [spyder-ide/spyder] Problem with Numpy version compatibility (Issue #23489)
Hey @Alicia-Jackson, thanks for reporting. This problem is caused by installing Numpy, or a package that depends on it, with pip in a conda environment. Since pip and conda packages are binary incompatible, they can't be mixed in the same environment.
Hey @Alicia-Jackson<https://urldefense.com/v3/__https:/github.com/Alicia-Jackson__;!!ATcW2YLElvbH!nS6MaaXdJa_3FWRTQqA8wRzaO_Z7OyEkUciFjOL2Q-VdcHyCpBPYby1V5HA2VZGu6uKNW014NWIupIt-nOm59_xyCAE$>, thanks for reporting. This problem is caused by installing Numpy, or a package that depends on it, with pip in a conda environment. Since pip and conda packages are binary incompatible, they can't be mixed in the same environment.
To solve it, you need to remove this directory
C:\Users\ahong\AppData\Roaming\Python
Let us know if that works for you. And if you want to learn more about this problem, check our our video<https://urldefense.com/v3/__https:/www.youtube.com/watch?v=Ul79ihg41Rs__;!!ATcW2YLElvbH!nS6MaaXdJa_3FWRTQqA8wRzaO_Z7OyEkUciFjOL2Q-VdcHyCpBPYby1V5HA2VZGu6uKNW014NWIupIt-nOm55VehsoM$> about it.
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/spyder-ide/spyder/issues/23489*issuecomment-2596373185__;Iw!!ATcW2YLElvbH!nS6MaaXdJa_3FWRTQqA8wRzaO_Z7OyEkUciFjOL2Q-VdcHyCpBPYby1V5HA2VZGu6uKNW014NWIupIt-nOm59YdYKDM$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/BF7HRZPJGAYIKO4D6TQYZH32K7X3JAVCNFSM6AAAAABVKBUE2SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKOJWGM3TGMJYGU__;!!ATcW2YLElvbH!nS6MaaXdJa_3FWRTQqA8wRzaO_Z7OyEkUciFjOL2Q-VdcHyCpBPYby1V5HA2VZGu6uKNW014NWIupIt-nOm55vRKbqs$>.
You are receiving this because you were mentioned.Message ID: ***@***.******@***.***>>
Plymouth Rock Assurance® and Plymouth Rock® are brand names and service marks used by separate underwriting, managed insurance, and management companies that offer property and casualty insurance in multiple states pursuant to licensing arrangements. Each underwriting and managed insurance company is a separate legal entity that is financially responsible only for its own insurance products.
|
To solve that problem, I'm afraid you'll have to remove and reinstall Anaconda. And to properly do that, please follow the instructions in the second part of our video about it (the first part describes in more detail why you can't mix pip and conda packages). Let us know how that goes. |
Would I need to re-install all the python packages if I reinstall Anaconda? I seem to be able to pypass this error but a new pop up screen came up with below (although the C:\Users\ahong\AppData\Roaming\Python was deleted) A module that was compiled using NumPy 1.x cannot be run in If you are a user of the module, the easiest solution will be to Traceback (most recent call last): File "C:\Users\ahong\Anaconda3\lib\site-packages\spyder\dependencies.py", line 425, in declare_dependencies |
Yes, you'll have to, sorry. That's why it's not a good idea to install packages with pip in a conda environment.
It's the same error as before, but now there's no workaround for it but to reinstall Anaconda
You'll lose any additional packages you installed after installing Anaconda. You'll also lose all your conda environments, in case you created some of them. |
Description
What steps will reproduce the problem?
Step: simply open spyder and the error pops up
Error Detail: from .move import (move_argmax, move_argmin, move_max, move_mean, move_median,
AttributeError: _ARRAY_API not found
Traceback
Versions
Dependencies
The text was updated successfully, but these errors were encountered: