我使用这里给出的pip安装了textblob .
现在,当我尝试在终端中的python3.4中导入它时,它说
ImportError: No module named 'textblob'
Run Code Online (Sandbox Code Playgroud)
然而,在python2.7中它很愉快地导入.我试过重新安装它.我甚至重新安装了pip.这里有什么问题?
我想让我的情节与此类似-
目前,我能得到的是:
我无法执行以下操作:
以下是生成绘图的可重现代码
arr = np.random.randint(0, 24, size = 50000)
df = pd.DataFrame({"COL": arr}).COL.value_counts().sort_index()
N = 24
bottom = 1000
theta, width = np.linspace(0.0, 2 * np.pi, N, endpoint=False, retstep=True)
plt.figure(figsize = (10, 6))
ax = plt.subplot(111, polar=True)
bars = ax.bar(
theta, df,
width=width-0.03,
bottom=bottom,
color="#f39c12", edgecolor="black"
)
bars = ax.bar(
theta, [3000]*24,
width=width-0.03,
bottom=bottom,
color="#f39c12", alpha=0.2
)
ax.set_theta_zero_location("N")
ax.set_theta_direction(-1)
ax.grid(False)
ax.spines['polar'].set_visible(False)
ax.set_rticks([]) …Run Code Online (Sandbox Code Playgroud)