In Spark, I import MultiClassMetrics using this command from pyspark.mllib.evaluation import MulticlassMetrics but get below error:
ImportError: No module named evaluation
How can i resolve this problem?
Thanks
Related
ImportError Traceback (most recent call last)
c:\Users\ychen\Documents\GitHub\pollen_testing.ipynb Cell 1' in <cell line: 3>()
1 import pandas as pd
2 import numpy as np
----> 3 from psy_strat.stratplot import stratplot
5 from IPython.display import Image
6 from overnight_consistency_checker import ConsistencyChecker, FFT_values
What is wrong with it, I do not know how to fix this problem. I even try to install numpy again, it does still not work out.
I just used used the Seaborn library about 5 days ago, no problems.
Tried to use it yesterday and it's giving an error when I try to import. Someone about a year ago had the same exact problem but their fix did not work for me. I'm trying to complete a project and this is a huge set back so if anyone can help, please do!
input
import seaborn as sns
result
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-3-a84c0541e888> in <module>
----> 1 import seaborn as sns
/opt/anaconda3/envs/datascience/lib/python3.6/site-packages/seaborn/__init__.py in <module>
8 from .palettes import *
9 from .linearmodels import *
---> 10 from .categorical import *
11 from .distributions import *
12 from .timeseries import *
/opt/anaconda3/envs/datascience/lib/python3.6/site-packages/seaborn/categorical.py in <module>
5 from scipy import stats
6 import pandas as pd
----> 7 from pandas.core.series import remove_na
8 import matplotlib as mpl
9 from matplotlib.collections import PatchCollection
ImportError: cannot import name 'remove_na'
Uninstalled & reinstalled scipy package, though cannot seem to import linalg function.
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-3-133368b721e2> in <module>
1 import numpy as np
2 import sklearn
----> 3 from scipy import linlag
ImportError: cannot import name 'linlag' from 'scipy' (C:\Users\lenov\anaconda3\lib\site-packages\scipy\__init__.py)
It's a minor syntax error. It should be "linalg".
Generator.groovy*
import jenkins.model.Jenkins
import javaposse.jobdsl.dsl.DslFactory
import com.cs.folderCreation
//Normal code
.............................
EndOfFile*********
----------Error log--------------------------
Generator.groovy: 5: unable to resolve class com.cs.folderCreation
# line 5, column 1.
import com.bmw.cs.folderCreation
^
1 error
Finished: FAILURE
Resloved!
It was just a plugin issue.
Improper configuration can lead to unknown issues.
I wanted to import geopandas as gpd, but the error message appears
ModuleNotFoundError: No module named 'pandas.api.extensions'.
What I have to do, to import geopandas?
I installed geopandas via anaconda promt:
C:\Users\sar>conda install -c conda-forge geopandas
Collecting package metadata (current_repodata.json): done
Solving environment: done
All requested packages already installed.
When i import geopandas, following code is shown in the console:
import geopandas as gpd
Traceback (most recent call last):
File "<ipython-input-16-a62d01c1d62e>", line 1, in <module>
import geopandas as gpd
File "C:\Users\sar\Anaconda\envs\codingingis\lib\site-packages\geopandas\__init__.py", line 1, in <module>
from geopandas.geoseries import GeoSeries # noqa
File "C:\Users\sar\Anaconda\envs\codingingis\lib\site-packages\geopandas\geoseries.py", line 15, in <module>
from geopandas.base import GeoPandasBase, _delegate_property
File "C:\Users\sar\Anaconda\envs\codingingis\lib\site-packages\geopandas\base.py", line 13, in <module>
from .array import GeometryArray, GeometryDtype
File "C:\Users\sar\Anaconda\envs\codingingis\lib\site-packages\geopandas\array.py", line 7, in <module>
from pandas.api.extensions import ExtensionArray, ExtensionDtype
ModuleNotFoundError: No module named 'pandas.api.extensions'
in array.py this code is not found:
from pandas.api.extensions import ExtensionArray, ExtensionDtype