pip3 list ,obviously scikit-learn has been installed sucessfully
root@tx2:~# pip3 list
Package Version
absl-py 0.8.0
apt-clone 0.2.1
apturl 0.5.2
asn1crypto 0.24.0
astor 0.8.0
beautifulsoup4 4.6.0
blinker 1.4
Brlapi 0.6.6
certifi 2018.1.18
chardet 3.0.4
cryptography 2.1.4
cupshelpers 1.0
cycler 0.10.0
Cython 0.29.14
decorator 4.1.2
defer 1.0.6
distro-info 0.18ubuntu0.18.04.1
feedparser 5.2.1
gast 0.3.2
google-pasta 0.1.7
graphsurgeon 0.4.1
grpcio 1.24.0
h5py 2.10.0
html5lib 0.999999999
httplib2 0.9.2
idna 2.6
joblib 0.14.0
Keras 2.3.1
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
keyring 10.6.0
keyrings.alt 3.0
kiwisolver 1.1.0
language-selector 0.1
launchpadlib 1.10.6
lazr.restfulclient 0.13.5
lazr.uri 1.0.3
louis 3.5.0
lxml 4.2.1
macaroonbakery 1.1.3
Mako 1.0.7
Markdown 3.1.1
MarkupSafe 1.0
mock 3.0.5
numpy 1.16.4
oauth 1.0.1
oauthlib 2.0.6
olefile 0.45.1
PAM 0.4.2
Pillow 5.1.0
pip 19.2.3
portpicker 1.3.1
protobuf 3.9.2
psutil 5.6.3
py-cpuinfo 5.0.0
pycairo 1.16.2
pycrypto 2.6.1
pycups 1.9.73
pygobject 3.26.1
PyICU 1.9.8
PyJWT 1.5.3
pymacaroons 0.13.0
PyNaCl 1.1.2
pyparsing 2.4.2
pyRFC3339 1.0
python-apt 1.6.4
python-dateutil 2.6.1
python-debian 0.1.32
pytz 2018.3
pyxdg 0.25
PyYAML 3.12
requests 2.22.0
requests-unixsocket 0.1.5
scikit-learn 0.21.3
scipy 0.19.1
SecretStorage 2.3.1
setuptools 41.4.0
simplejson 3.13.2
six 1.12.0
sklearn 0.0
ssh-import-id 5.7
system-service 0.3
systemd-python 234
tensorboard 1.14.0
tensorflow-estimator 1.14.0
tensorflow-gpu 1.14.0+nv19.7
tensorrt 5.1.6.1
termcolor 1.1.0
ubuntu-drivers-common 0.0.0
uff 0.6.3
unity-scope-calculator 0.1
unity-scope-chromiumbookmarks 0.1
unity-scope-colourlovers 0.1
unity-scope-devhelp 0.1
unity-scope-firefoxbookmarks 0.1
unity-scope-manpages 0.1
unity-scope-openclipart 0.1
unity-scope-texdoc 0.1
unity-scope-tomboy 0.1
unity-scope-virtualbox 0.1
unity-scope-yelp 0.1
unity-scope-zotero 0.1
urllib3 1.22
wadllib 1.3.2
webencodings 0.5
Werkzeug 0.16.0
wheel 0.30.0
wrapt 1.11.2
xkit 0.0.0
zope.interface 4.3.2
WARNING: You are using pip version 19.2.3, however version 19.3.1 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
But when i run the simple demo ,some errors still existed
root@tx2:~/Documents# python3 skitest.py
Traceback (most recent call last):
File “skitest.py”, line 1, in
import skimage.transform as st
ModuleNotFoundError: No module named ‘skimage’
and the skitest.py is as follows:
import skimage.transform as st
import numpy as np
import matplotlib.pyplot as plt
#matplotlib inline
构建测试图片
image = np.zeros((100, 100)) #背景图
idx = np.arange(25, 75) #25-74序列
image[idx[::-1], idx] = 255 # 线条
image[idx, idx] = 255 # 线条/
hough线变换
h, theta, d = st.hough_line(image)
#生成一个一行两列的窗口(可显示两张图片).
fig, (ax0, ax1) = plt.subplots(1, 2, figsize=(8, 6))
plt.tight_layout()
#显示原始图片
ax0.imshow(image, plt.cm.gray)
ax0.set_title(‘Input image’)
ax0.set_axis_off()
#显示hough变换所得数据
ax1.imshow(np.log(1 + h))
ax1.set_title(‘Hough transform’)
ax1.set_xlabel(‘Angles (degrees)’)
ax1.set_ylabel(‘Distance (pixels)’)
ax1.axis(‘image’)
plt.show()
SO what should i do ,please tell me.