我希望为我的Jupyter笔记本电脑创建自定义环境,而不必在会话中安装各种软件包。
按照https://dataplatform.cloud.ibm.com/docs/content/wsj/analyze-data/customize-envs.html的说明,我按如下方式定制了环境>
# Modify the following content to add a software customization to an environment. # To remove an existing customization, delete the entire content and click Apply. # Add conda channels below defaults, indented by two spaces and a hyphen. channels: - defaults # To add packages through conda or pip, remove the comment on the following line. # dependencies: # Add conda packages here, indented by two spaces and a hyphen. # Remove the comment on the following line and replace sample package name with your package name: - ffmpeg=4.2.2 # Add pip packages here, indented by four spaces and a hyphen. # Remove the comments on the following lines and replace sample package name with your package name. - pip: - numpy==1.18.0 - pandas==1.0.3 - matplotlib==3.1.3
因为我的笔记本和最新版本的
pandas
,numpy
和matplotlib
需要mpeg编解码器。
配置是
Environment Custom env Creator Andrea Chiappo Language Python 3.6 Hardware configuration 4 vCPU and 16 GB RAM Software configuration Default Python 3.6 + DO
但是,一旦我开始会话,如果尝试的话
import pandas as pd print(pd.__version__)
我得到了程序包的默认版本,即
0.24.1
。
有人知道如何在我的jypter会话中启用此类Python软件包的最新版本吗?非常感谢
我希望为我的Jupyter笔记本电脑创建自定义环境,而不必在会话中安装各种软件包。请遵循https://dataplatform.cloud.ibm ....
您需要取消注释# dependencies:
行。并且随时摆脱所有评论。这将有助于发现YAML格式的缩进问题。试试这个: