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
'RuntimeError: implement_array_function method already has a docstring' after matplotlib installation #15563
Comments
Same problem here.. after upgrade python3 and reinstall necessary modules following occured suddenly. |
Does this happen outside pycharm (from a regular cmd command prompt, activate your conda environment then try to run your code)? |
@aemm2016 note you seem to be on Linux, not windows. Are you also running from inside PyCharm? |
Traceback (most recent call last): |
I see that PyCharm has a import hook:
Is |
have you tried |
looks like #14012 may also be related. |
This is happening to me too, only in PyCharm. The problem went away after I rebuilt my virtualenv. |
you can simply just try |
this happened ever since I upgraded to pycharm 2020.1 |
Is this issue still active or has it been resolved in PyDev/pycharm? Are the pycharm/pydev instructions in the troubleshooting guide relevant? |
This was an "issue" with Numpy, it should be fixed by gh-16239, although importing NumPy twice works now more realiably, it can lead to errors, I have a PR which would add a warning when this happens. But I think you are right and we can close this. |
This issue may occure when numpy/matplotlib or their requiment packages degraded, with their dependency broken and version requiments not met. For example: install package of six to 1.5.6, which break the requirement six>=1.10 of matplotlib 2.2.5 . I found a solution that works in Pycharm.
I think step 3 is key and make use, while step 1 and 2 explains why this issue not happens outside pycharm. I wish my comment can help. |
I'm using numpy==1.18.1 within a conda environment. Everything worked fine until I installed matplotlib==3.1.3 yesterday. After matplotlib has been installed (successfully), and I try to import either matplotlib or numpy using
or
I get the following error:
Error message:
`Traceback (most recent call last):
File "C:\Users\user\AppData\Roaming\Python\Python36\site-
packages\IPython\core\interactiveshell.py", line 2963, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 1, in
import matplotlib
File "C:\Program Files\JetBrains\PyCharm
2019.2.3\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "C:\Users\user\Anaconda3\envs\ma-automl-ppm\lib\site-packages\matplotlib_init.py", line 138, in
from . import cbook, rcsetup
File "C:\Program Files\JetBrains\PyCharm
2019.2.3\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "C:\Users\user\Anaconda3\envs\ma-automl-ppm\lib\site-
packages\matplotlib\cbook_init.py", line 31, in
import numpy as np
File "C:\Program Files\JetBrains\PyCharm
2019.2.3\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "C:\Users\user\Anaconda3\envs\ma-automl-ppm\lib\site-packages\numpy_init.py", line
142, in
from . import core
File "C:\Program Files\JetBrains\PyCharm
2019.2.3\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self.system_import(name, *args, **kwargs)
File "C:\Users\user\Anaconda3\envs\ma-automl-ppm\lib\site-packages\numpy\core_init.py",
line 24, in
from . import multiarray
File "C:\Program Files\JetBrains\PyCharm
2019.2.3\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\user\Anaconda3\envs\ma-automl-ppm\lib\site-
packages\numpy\core\multiarray.py", line 14, in
from . import overrides
File "C:\Program Files\JetBrains\PyCharm
2019.2.3\helpers\pydev_pydev_bundle\pydev_import_hook.py", line 21, in do_import
module = self._system_import(name, *args, **kwargs)
File "C:\Users\user\Anaconda3\envs\ma-automl-ppm\lib\site-packages\numpy\core\overrides.py", line 47, in
""")
RuntimeError: implement_array_function method already has a docstring`
Numpy/Python version information:
'3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 14:00:49) [MSC v.1915 64 bit (AMD64)]'
installed packages within the virtual environment:
absl-py 0.9.0 alembic 1.3.2 astor 0.8.1 autokeras 1.0.0 backcall 0.1.0 bleach 2.1.3 cachetools 4.0.0 certifi 2019.11.28 chardet 3.0.4 ciso8601 2.1.2 Click 7.0 colorama 0.3.9 cycler 0.10.0 dash 1.7.0 dash-bootstrap-components 0.7.2 dash-core-components 1.6.0 dash-daq 0.3.1 dash-html-components 1.0.2 dash-renderer 1.2.2 dash-table 4.5.1 decorator 4.3.0 dnspython 1.16.0 entrypoints 0.2.3 eventlet 0.25.1 Flask 1.1.1 Flask-Caching 1.8.0 Flask-Compress 1.4.0 Flask-Migrate 2.5.2 Flask-SocketIO 4.2.1 Flask-SQLAlchemy 2.4.1 future 0.18.2 gast 0.2.2 google-auth 1.11.0 google-auth-oauthlib 0.4.1 google-pasta 0.1.8 graphviz 0.13.2 greenlet 0.4.15 grpcio 1.26.0 h5py 2.10.0 html5lib 1.0.1 idna 2.8 intervaltree 3.0.2 ipykernel 4.8.2 ipython 6.4.0 ipython-genutils 0.2.0 ipywidgets 7.2.1 itsdangerous 1.1.0 jedi 0.12.0 Jinja2 2.10.3 joblib 0.14.1 jsonschema 2.6.0 jupyter 1.0.0 jupyter-client 5.2.3 jupyter-console 5.2.0 jupyter-core 4.4.0 Keras 2.3.1 Keras-Applications 1.0.8 Keras-Preprocessing 1.1.0 keras-tuner 1.0.1 kiwisolver 1.0.1 lightgbm 2.3.1 lxml 4.4.2 Mako 1.1.0 Markdown 3.1.1 MarkupSafe 1.0 matplotlib 3.1.3 mistune 0.8.3 mkl-fft 1.0.15 mkl-random 1.1.0 mkl-service 2.3.0 monotonic 1.5 mpmath 1.0.0 nbconvert 5.3.1 nbformat 4.4.0 networkx 2.4 nose 1.3.7 notebook 5.5.0 numpy 1.18.1 oauthlib 3.1.0 opt-einsum 3.1.0 opyenxes 0.3.0 ortools 7.4.7247 packaging 20.1 pandas 0.25.3 pandocfilters 1.4.2 parso 0.2.1 pickleshare 0.7.4 pip 19.3.1 plotly 4.4.1 pm4py 1.2.8 prompt-toolkit 1.0.15 protobuf 3.11.2 psutil 5.6.5 PuLP 2.0 pyarrow 0.15.1 pyasn1 0.4.8 pyasn1-modules 0.2.8 pydotplus 2.0.2 Pygments 2.4.2 pyparsing 2.2.0 python-dateutil 2.7.3 python-editor 1.0.4 python-engineio 3.10.0 python-socketio 4.4.0 pytz 2019.3 pyvis 0.1.7.0 pywinpty 0.5.3 PyYAML 5.3 pyzmq 17.0.0 qtconsole 4.3.1 requests 2.22.0 requests-oauthlib 1.3.0 retrying 1.3.3 rsa 4.0 scikit-learn 0.22.1 scipy 1.4.1 Send2Trash 1.5.0 setuptools 42.0.1.post20191125 simplegeneric 0.8.1 six 1.11.0 sklearn 0.0 sortedcontainers 2.1.0 SQLAlchemy 1.3.12 sympy 1.1.1 tabulate 0.8.6 tensorboard 2.0.2 tensorflow 2.0.0 tensorflow-estimator 2.0.1 termcolor 1.1.0 terminado 0.8.1 terminaltables 3.1.0 testpath 0.3.1 tornado 5.0.2 tqdm 4.41.1 traitlets 4.3.2 urllib3 1.25.7 wcwidth 0.1.7 webencodings 0.5.1 websockets 8.1 Werkzeug 0.16.0 wheel 0.33.6 widgetsnbextension 3.2.1 wincertstore 0.2 wrapt 1.11.2
The text was updated successfully, but these errors were encountered: