[問題] VS code 找不到library
抱歉打擾各位
我目前作業環境為Ubuntu 16.04
套件用conda 管理
今天想要嘗試numpy-stl套件
下述範例讀取.stl檔
使用Vs code 卻有ImportError: No module named stl
但是我在vs code裡終端機裡打conda list有看到numpy-stl
所以我是那邊沒有設定好?
讀取範例程式碼:
from stl import mesh
from mpl_toolkits import mplot3d
from matplotlib import pyplot
# Create a new plot
figure = pyplot.figure()
axes = mplot3d.Axes3D(figure)
# Load the STL files and add the vectors to the plot
your_mesh = mesh.Mesh.from_file('/home/chen/sample3.stl')
axes.add_collection3d(mplot3d.art3d.Poly3DCollection(your_mesh.vectors))
# Auto scale to the mesh size
scale = your_mesh.points.flatten(-1)
axes.auto_scale_xyz(scale, scale, scale)
# Show the plot to the screen
pyplot.show()
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.125.96.131
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1516631453.A.FFB.html
推
01/23 01:41,
7年前
, 1F
01/23 01:41, 1F
→
01/23 01:41,
7年前
, 2F
01/23 01:41, 2F
推
01/23 02:42,
7年前
, 3F
01/23 02:42, 3F
→
01/23 02:43,
7年前
, 4F
01/23 02:43, 4F
→
01/23 02:44,
7年前
, 5F
01/23 02:44, 5F
推
01/23 08:44,
7年前
, 6F
01/23 08:44, 6F
→
01/23 12:57,
7年前
, 7F
01/23 12:57, 7F
→
01/23 12:57,
7年前
, 8F
01/23 12:57, 8F
推
01/24 20:41,
7年前
, 9F
01/24 20:41, 9F
→
01/25 18:08,
7年前
, 10F
01/25 18:08, 10F
→
01/25 18:09,
7年前
, 11F
01/25 18:09, 11F
→
01/25 22:29,
7年前
, 12F
01/25 22:29, 12F
→
01/29 17:01,
7年前
, 13F
01/29 17:01, 13F
→
02/13 21:00,
7年前
, 14F
02/13 21:00, 14F
→
02/13 21:00,
7年前
, 15F
02/13 21:00, 15F
Python 近期熱門文章
PTT數位生活區 即時熱門文章