在 python 配置包
Configure package on python
我很好奇这里是否有人能够使用 h5py 库成功访问 NREL 的风数据集,如下所述:https://github.com/NREL/hsds-examples ?
我在配置 HSDS 时遇到问题。我正在使用 Python 3.7.10 和 Anaconda。这些是列出的步骤:
要使其正常工作,您必须先安装 h5pyd:
pip install --user h5pyd
接下来您需要配置 HSDS:
hsconfigure
并在提示符处输入:
hs_endpoint = https://developer.nrel.gov/api/hsds
hs_username = None
hs_password = None
hs_api_key = 3K3JQbjZmWctY0xmIfSYvYgtIcM3CN0cb1Y2w9bf
如何配置 HSDS?当我在终端中输入“hsconfigure”时,我看到一个错误“找不到命令”。出现这种情况是因为我用pip下载的吗?
有什么建议吗?我从来不需要在 Python 上配置任何东西,所以我在这里很迷茫,不确定从哪里开始。
我能够通过以下设置获得它 运行:
(可选)MambaForge base。 Mamba 比 Conda 快,并且在 base 中工作实际上是一种反模式。
专用环境中的 Jupyter。
jupyter.yaml
name: jupyter
channels:
- conda-forge
dependencies:
- jupyter
- nb_conda_kernels
命令
mamba env create -n jupyter -f jupyter.yaml
专用内核环境中的 HSDS。
hsds.yaml
name: hsds
channels:
- conda-forge
dependencies:
# core requirements
- python=3.9
- ipykernel # enables use in jupyter
# dependencies and modules used in notebooks
- h5py
- pandas
- scipy
- pyproj
- pytz
- matplotlib
- seaborn
- requests
# install h5pyd from PyPA
- pip
- pip:
- h5pyd
命令
mamba env create -n hsds -f hsds.yaml
mamba run -n hsds --no-capture-output hsconfigure
## follow instructions
克隆 repo 并在其中启动 Jupyter。
git clone https://github.com/NREL/hsds-examples.git
cd hsds-examples
conda activate jupyter
jupyter notebook
导航到笔记本 (.ipynb),select hsds 作为内核。
我很好奇这里是否有人能够使用 h5py 库成功访问 NREL 的风数据集,如下所述:https://github.com/NREL/hsds-examples ?
我在配置 HSDS 时遇到问题。我正在使用 Python 3.7.10 和 Anaconda。这些是列出的步骤:
要使其正常工作,您必须先安装 h5pyd:
pip install --user h5pyd
接下来您需要配置 HSDS:
hsconfigure
并在提示符处输入:
hs_endpoint = https://developer.nrel.gov/api/hsds
hs_username = None
hs_password = None
hs_api_key = 3K3JQbjZmWctY0xmIfSYvYgtIcM3CN0cb1Y2w9bf
如何配置 HSDS?当我在终端中输入“hsconfigure”时,我看到一个错误“找不到命令”。出现这种情况是因为我用pip下载的吗?
有什么建议吗?我从来不需要在 Python 上配置任何东西,所以我在这里很迷茫,不确定从哪里开始。
我能够通过以下设置获得它 运行:
(可选)MambaForge base。 Mamba 比 Conda 快,并且在 base 中工作实际上是一种反模式。
专用环境中的 Jupyter。
jupyter.yaml
name: jupyter channels: - conda-forge dependencies: - jupyter - nb_conda_kernels
命令
mamba env create -n jupyter -f jupyter.yaml
专用内核环境中的 HSDS。
hsds.yaml
name: hsds channels: - conda-forge dependencies: # core requirements - python=3.9 - ipykernel # enables use in jupyter # dependencies and modules used in notebooks - h5py - pandas - scipy - pyproj - pytz - matplotlib - seaborn - requests # install h5pyd from PyPA - pip - pip: - h5pyd
命令
mamba env create -n hsds -f hsds.yaml mamba run -n hsds --no-capture-output hsconfigure ## follow instructions
克隆 repo 并在其中启动 Jupyter。
git clone https://github.com/NREL/hsds-examples.git cd hsds-examples conda activate jupyter jupyter notebook
导航到笔记本 (.ipynb),select hsds 作为内核。