问题:在python3.9环境下,使用pip安装dogpile.cache模块时报错ImportError: cannot import name 'Lock' from 'dogpile'
解决:在python3.5环境下不会出现此问题,开始以为是python版本的问题,后来发现安装时提示了not install wheel,所以只需要安装wheel即可。也可能是dogpile.core与dogpile.cache冲突,删除dogpile.core即可。
方法:
windows安装 python3.9
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install --upgrade pip wheel
.\.venv\Scripts\pip3.9.exe install -r setup/requirements.txt -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
.\.venv\Scripts\pip.exe uninstall dogpile.core
参考:
https://github.com/Diaoul/subliminal/issues/721