Today, I want to open the image with pycharm, but an error is reported when I import scipy. The error content is as follows:
from scipy.misc import imread Traceback (most recent call last): File "<input>", line 1, in <module> File "D:\pycharm\PyCharm Community Edition 2017.2.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, **kwargs) File "D:\Python\lib\site-packages\scipy\misc\__init__.py", line 67, in <module> from scipy.interpolate._pade import pade as _pade File "D:\pycharm\PyCharm Community Edition 2017.2.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, **kwargs) File "D:\Python\lib\site-packages\scipy\interpolate\__init__.py", line 175, in <module> from .interpolate import * File "D:\pycharm\PyCharm Community Edition 2017.2.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, **kwargs) File "D:\Python\lib\site-packages\scipy\interpolate\interpolate.py", line 21, in <module> import scipy.special as spec File "D:\pycharm\PyCharm Community Edition 2017.2.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, **kwargs) File "D:\Python\lib\site-packages\scipy\special\__init__.py", line 648, in <module> from ._ellip_harm import ellip_harm, ellip_harm_2, ellip_normal File "D:\pycharm\PyCharm Community Edition 2017.2.3\helpers\pydev\_pydev_bundle\pydev_import_hook.py", line 21, in do_import module = self._system_import(name, *args, **kwargs) File "D:\Python\lib\site-packages\scipy\special\_ellip_harm.py", line 7, in <module> from ._ellip_harm_2 import _ellipsoid, _ellipsoid_norm ImportError: cannot import name '_ellipsoid'
I thought that my package was out of date, so I uninstalled it, and pycharm prompted uninstall SCI py failed
???
Then I enter the python directory from cmd, and switch to the scripts directory, where I execute pip install requests
It can be installed successfully. After restarting pycharm, it can be uninstalled correctly. However, I installed scipy again and still reported an error.
Solution: input in the above directory
pip install --upgrade --force-reinstall scipy
Wrong again, PermissionError
resolvent:
pip install --upgrade --user --force-reinstall scipy
Although it indicates that the installation is successful, import scipy still reports an error. I'd better change my bag
However, using PIP install panda in the window will show: could not find a version. No matching distribution found
Solution: use
python -m pip install [Package_to_install]
Just fine.
If you dislike the slow Internet, you can use Tsinghua mirror
Add - i after pip https://pypi.tuna.tsinghua.edu.cn/simple