from sklearn.datasets import load_boston boston = load_boston() import pandas as pd boston_df = pd.DataFrame(boston.data, columns = boston.feature_names) boston_df['MEDV'] = boston.target boston_df.head()
TypeError: descriptor ‘__subclasses__’ of ‘type’ object needs an argument
[vagrant@localhost python]$ sudo yum install -y https://centos6.iuscommunity.org/ius-release.rpm
まず、python36を入れます。
[vagrant@localhost python]$ sudo yum install -y python36*
[vagrant@localhost python]$ pyenv versions
system
* 3.5.2 (set by /home/vagrant/.pyenv/version)
[vagrant@localhost python]$ pyenv install 3.6.4
Downloading Python-3.6.4.tar.xz…
-> https://www.python.org/ftp/python/3.6.4/Python-3.6.4.tar.xz
Installing Python-3.6.4…
Installed Python-3.6.4 to /home/vagrant/.pyenv/versions/3.6.4
[vagrant@localhost python]$ pyenv global 3.6.4
[vagrant@localhost python]$ python -V
Python 3.6.4
[vagrant@localhost python]$ pip list
Package Version
——————– ——-
absl-py 0.8.0
astor 0.8.0
chainer 6.3.0
cycler 0.10.0
decorator 4.4.0
filelock 3.0.12
gast 0.2.2
google-pasta 0.1.7
grpcio 1.23.0
h5py 2.9.0
imageio 2.5.0
joblib 0.13.2
Keras 2.2.5
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
kiwisolver 1.1.0
Markdown 3.1.1
matplotlib 3.1.1
networkx 2.3
numpy 1.17.1
pandas 0.25.1
Pillow 6.1.0
pip 19.2.3
protobuf 3.7.1
pyparsing 2.4.2
python-dateutil 2.8.0
pytz 2019.2
PyWavelets 1.0.3
PyYAML 5.1.2
scikit-image 0.15.0
scikit-learn 0.21.3
scipy 1.3.1
setuptools 28.8.0
six 1.12.0
tensorboard 1.14.0
tensorflow 1.14.0
tensorflow-estimator 1.14.0
termcolor 1.1.0
Theano 1.0.4
typing 3.6.6
typing-extensions 3.6.6
Werkzeug 0.15.5
wheel 0.33.6
wrapt 1.11.2
[vagrant@localhost python]$ python myapp.py
/home/vagrant/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pandas/compat/__init__.py:84: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
warnings.warn(msg)
/home/vagrant/.pyenv/versions/3.6.4/lib/python3.6/site-packages/pandas/compat/__init__.py:84: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError.
warnings.warn(msg)
なにいいいいいいいいいいいいいいいいいいいいいい