1.使用pip安装包的时候,TLS CA证书束找不到问题
该问题的解决得益于 stackoverflow论坛
解决方法:
- 找到cacert.pem位置,一般在python安装目录,如:
'D:\App_Install\Python\Lib\site-packages\pip\_vendor\certifi\cacert.pem'
- 更改系统环境变量:
- 使用pip安装一个包,看是否可以使用,如:
pip install numpy
- 如果还是有问题可以通过以下代码对python的配置进行更改:
pip config set global.cert "D:\App_Install\Python\Lib\site-packages\pip\_vendor\certifi\cacert.pem"
然后使用如下命令查看是否已经将global.cert成功更改了:
pip config -v list
2.使用pip安装国际土壤水分阅读器ISMN包的时候会报如下错误
Getting requirements to build wheel ... error
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [32 lines of output]
reading from setup.cfg...
HDF5_DIR environment variable not set, checking some standard locations ..
checking C:\Users\阿龙\include...
hdf5 headers not found in C:\Users\阿龙\include
checking /usr/local\include...
hdf5 headers not found in /usr/local\include
checking /sw\include...
hdf5 headers not found in /sw\include
checking /opt\include...
hdf5 headers not found in /opt\include
checking /opt/local\include...
hdf5 headers not found in /opt/local\include
checking /opt/homebrew\include...
hdf5 headers not found in /opt/homebrew\include
checking /usr\include...
hdf5 headers not found in /usr\include
Traceback (most recent call last):
File "d:\app_install\python\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "d:\app_install\python\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "d:\app_install\python\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\阿龙\AppData\Local\Temp\pip-build-env-gb3khdvh\overlay\Lib\site-packages\setuptools\build_meta.py", line 327, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
File "C:\Users\阿龙\AppData\Local\Temp\pip-build-env-gb3khdvh\overlay\Lib\site-packages\setuptools\build_meta.py", line 297, in _get_build_requires
self.run_setup()
File "C:\Users\阿龙\AppData\Local\Temp\pip-build-env-gb3khdvh\overlay\Lib\site-packages\setuptools\build_meta.py", line 313, in run_setup
exec(code, locals())
File "<string>", line 277, in <module>
File "<string>", line 226, in _populate_hdf5_info
ValueError: did not find HDF5 headers
解决方案:首先安装netCDF4
pip install netCDF4==1.5.4
然后执行:
pip install ismn
最终问题得以解决,可以成功安装ISMN