噩梦重演,在安装了gluonts的虚拟环境中安装matplotlib报错连连:
- AttributeError: module ‘dateutil.tz’ has no attribute ‘UTC’
方案一:python -m pip install --upgrade python-dateutil
方案二:pip uninstall python-dateutil
pip install python-dateutil
but,but,第二次报同样错误时又不顶用了,在conda/pip uninstall/install python-dateutil,matplotlib,pandas等多次,依然没有效果。最后通过对比环境中包版本与官方requirement不一致的地方,升级ujson,pip install ujson --upgrade --user
,好像因此解决问题,安装环境对我来说有时候是一门玄学,不知道怎么不行,不知道怎么又行了,不知道之前行现在为什么又不行… - ImportError: No module named dateutil.relativedelta
也是升级python-dateutil,参考
或者升级pandas?参考 - from matplotlib.cbook import is_string_like, el ImportError: cannot import name ‘is_string_like’
conda uninstall matplotlib
,参考 - We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.
First check if your pip is updated:
python -m pip install --upgrade pip
and then use:
pip install example --use-feature=2020-resolver
参考链接
conda list:
# packages in environment at E:\soft\Anaconda3\envs\gluontsv3:
#
# Name Version Build Channel
argon2-cffi 20.1.0 pypi_0 pypi
async-generator 1.10 pypi_0 pypi
attrs 20.2.0 pypi_0 pypi
backcall 0.2.0 pypi_0 pypi
blas 1.0 mkl http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
bleach 3.2.1 pypi_0 pypi
certifi 2020.6.20 pypi_0 pypi
cffi 1.14.3 pypi_0 pypi
chardet 3.0.4 pypi_0 pypi
colorama 0.4.4 pypi_0 pypi
cycler 0.10.0 pypi_0 pypi
decorator 4.4.2 pypi_0 pypi
defusedxml 0.6.0 pypi_0 pypi
entrypoints 0.3 pypi_0 pypi
gluonts 0.5.2 pypi_0 pypi
icu 57.1 vc14_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
idna 2.6 pypi_0 pypi
importlib-metadata 2.0.0 pypi_0 pypi
ipykernel 5.3.4 pypi_0 pypi
ipython 7.16.1 pypi_0 pypi
ipython-genutils 0.2.0 pypi_0 pypi
ipywidgets 7.5.1 pypi_0 pypi
jedi 0.17.2 pypi_0 pypi
jpeg 9b vc14_0 http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
jsonschema 3.2.0 pypi_0 pypi
jupyter 1.0.0 pypi_0 pypi
jupyter-client 6.1.7 pypi_0 pypi
jupyter