我在Python WordCloud代码中出现导入错误。
REGEX_DATE="^[0-9]{4}-(0[0-9]|1[0-2])-([0-2][0-9]|3[0-1])[[:space:]]([0-1][0-9]|2[0-4]):[0-5][0-9]:[0-5][0-9]$"
bool=true
while $bool
do
echo $bool
echo "give active stop date and time (format YYYY-MM-DD HH:MI:SS) :"
read active_stop
if [ "$active_stop"=~$REGEX_DATE ]
then
bool=false
echo "date valide"
echo $active_stop
else
echo "date non valide"
fi
done
ModuleNotFoundError:没有名为'wordcloud'的模块
答案 0 :(得分:0)
您安装了软件包吗? 您可以使用pip安装它:
pip install wordcloud
答案 1 :(得分:0)
确保将wordcloud软件包安装在正确的环境中。运行:
pip freeze
如果看到wordcloud,则表明它已正确安装。
另一件事要检查您的python文件是否也未被称为wordcloud。
答案 2 :(得分:0)
Link;
https://www.lfd.uci.edu/~gohlke/pythonlibs/#wordcloud
Wordcloud: a little word cloud generator.
download
wordcloud‑1.6.0‑cp38‑cp38‑win32.whl
into the folder; copy-past
C:\Python\Scripts
CMD
cd\
cd C:\Python\Scripts
install
python -m pip install wordcloud-1.6.0-cp38-cp38-win32.whl
pip install wordcloud
result; occurs in folder;
C:\Python\Lib\site-packages
wordcloud
wordcloud-1.6.0.dist-info