ImportError: cannot import name '_path'

Asked 3 months ago, Updated 3 months ago, 12 views

I am trying to use Azure's Computer Vision API in Python (Anaconda3).
After using the sample code provided by MS in github,
There is an error and it cannot be resolved.

[Code]

import time
import requests
import operator
import numpy as np
from__future_import print_function
# Import library to display results
import matplotlib.pyplot asplt
%matplotlib inline
# Display images with in Jupiter

[Error Code (Excerpt)]

~\AppData\Local\Continuum\anaconda3\lib\site-packages\matplotlib\path.py in<module>()
 19 import numpy as np
 20 
--- >21 from.import_path, rcParams
 22 from.cbook import(_to_unmasked_float_array, simple_linear_interpolation,
 23 maxdict)


ImportError: cannot import name '_path'

There seems to be something wrong with matplotlib...

sversion br
matplotlib:2.2.3
numpy —1.14.2

python python3 anaconda3

2022-09-30 14:14

1 Answers

I am a beginner using Anaconda in Windows 10.
The same error occurred after updating Spyder alone.
I did the following without knowing the cause, and it was cured.

  • Run Anaconda prompt as an administrator and enter the following command:

    conda update matplotlib

conda update matplotlib


2022-09-30 14:14

If you have any answers or tips


© 2023 OneMinuteCode. All rights reserved.