'ImportError: cannot import cbook name' when using PyCharm Profiler

I try to start the PyCharm profiler, but I get the following error message:

Traceback (most recent call last):
  File "/home/b3053674/ProgramFiles/pycharm-2017.1.4/helpers/profiler/run_profiler.py", line 164, in <module>
    profiler.run(file)
  File "/home/b3053674/ProgramFiles/pycharm-2017.1.4/helpers/profiler/run_profiler.py", line 89, in run
    execfile(file, globals, globals)  # execute the script
  File "/home/b3053674/Documents/pycotools/pycotools/tasks.py", line 38, in <module>
    import viz,errors, misc, _base, model
  File "/home/b3053674/Documents/pycotools/pycotools/viz.py", line 53, in <module>
    import matplotlib.pyplot as plt
  File "/home/b3053674/anaconda2/envs/pycotools/lib/python2.7/site-packages/matplotlib/__init__.py", line 124, in <module>
    from . import cbook
ImportError: cannot import name cbook
Snapshot saved to /home/b3053674/.PyCharm2017.1/system/snapshots/pycotools30.pstat

Process finished with exit code 1

I use the conda environment, which I switched to in the terminal:

$ source activate <env>

and then updated matplotlib

$pip install matplotlib --upgrade

and six for a good grade

$pip install six --upgrade

(note that I also manually removed these packages from the site directory of my environment and reinstalled just incase --upgradedid not behave)

I looked here and here , and none of the solutions solved my problem.

I also switched PyCharm configurations Runto use each of my Cond environments, in turn, all of which produce the same error.

, , , . - , ?

+2
2

, , , - matplotlib / , -, .

, :

conda install six=1.10.0
conda install matplotlib=2.0.2
+7

jupyter, IPython. $ conda install matplotlib=2.0.2, , . ( ) .

+1

Source: https://habr.com/ru/post/1679590/


All Articles