AttributeError: 'property' object has no attribute '__name__'

大城市里の小女人 提交于 2021-01-28 06:26:08

问题


While I am importing the pandas in my data science project I am getting such kind of error. Does anyone know what might cause this?

I tried with re-installation of pandas and python also I also tried with wheel

import numpy as np
import pandas as pd

AttributeError                           
Traceback (most recent call last)
<ipython-input-2-b231533e2331> in <module>
      1 import numpy as np
----> 2 import pandas as pd
      3 from imblearn.over_sampling import SMOTE
      4 from sklearn.model_selection import train_test_split
      5 from sklearn.neighbors import KNeighborsClassifier

AttributeError: 'property' object has no attribute '__name__'

回答1:


"I got the solution for same. It may be multiple python version installation problem in same system problem so you need to create a virtual environment for your data science project now steps for creating virtual environment...."

1. install python 3.x 2. install pip 3. pip install virtualenv #for creating virtual environment 4. mkvirtualenv folder_name #command for creating virtual environment 5 pip install pandas # run this command in virtual environment directory

now import pandas it will work fine.



来源:https://stackoverflow.com/questions/56235417/attributeerror-property-object-has-no-attribute-name

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!