之前在安装hydra的时候一直安装不上去,按照网上的建议要先安装一个VC++的编译环境,我把这个装上去之后还是一直报错:
ERROR: Command errored out with exit status 1: ‘d:anacondaenvstorch371python.exe’ -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:UserslenovoAppDataLocalTemppip-install-k6o3k4onhydra_2deec89ac4
18489ab4a852adccc45490setup.py’"’"’; file=’"’"‘C:UserslenovoAppDataLocalTemppip-install-k6o3k4onhydra_2deec89ac418489ab4a852adccc45490setup.py’"’"’;f = getattr(tokenize, ‘"’"‘open’"’"’, open)(file) if os.pat
h.exists(file) else io.StringIO(’"’"‘from setuptools import setup; setup()’"’"’);code = f.read().replace(’"’"’rn’"’"’, ‘"’"’n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ install --record ‘C:UserslenovoApp
DataLocalTemppip-record-vkiywefdinstall-record.txt’ --single-version-externally-managed --compile --install-headers ‘d:anacondaenvstorch371Includehydra’ Check the logs for full command output.
搜索了很久没有解决
后来我发现安装这个库只需要输入这个命令就可以了
pip install hydra-core --upgrade
这个是它的官网
https://pypi.org/project/hydra-core/
安装之后就能在pycharm里面导入了



