【发布时间】:2020-11-16 04:51:23
【问题描述】:
我是 Python 新手,我正在尝试从一些简单的机器学习项目开始。我正在尝试将包 sys、scipy、numpy、matplotlib、pandas 和 sklearn 导入到 Visual Studio jupyter notebook。我正在使用此测试代码来查看它们是否正确导入:
import sys
print('Python: {}'.format(sys.version))
# scipy
import scipy
print('scipy: {}'.format(scipy.__version__))
# numpy
import numpy
print('numpy: {}'.format(numpy.__version__))
# matplotlib
import matplotlib
print('matplotlib: {}'.format(matplotlib.__version__))
# pandas
import pandas
print('pandas: {}'.format(pandas.__version__))
# scikit-learn
import sklearn
print('sklearn: {}'.format(sklearn.__version__))
当我在从 anaconda 启动的网站上使用 jupyter notebook 执行此操作时,它没有给我带来任何问题。但是,我想使用 VS 代码,但是当我在那里运行它时,它给了我这个:
P5 C:\Users\matti> conda activate base
conda : The term 'conda' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ conda activate base
发生了什么,我该如何解决这个问题,以便将这些包导入到我的 VS Code jupyter notebook 中?我对 Python 非常陌生,而且很多东西都需要编码,所以这可能是一个非常容易解决的问题。
PS 如果有人想帮助我了解更多关于将 Python 与机器学习结合使用的知识(对医学图像分割感兴趣),请随时私信我。只是一个努力学习的学生:)
【问题讨论】:
-
这可能会有所帮助:appuals.com/…
标签: python visual-studio-code jupyter-notebook anaconda