• 1.1 安装 jupyter notebook:
pip.exe install jupyter notebook -i  https://mirrors.aliyun.com/pypi/simple/

注:

-i 可选,可以搜索“python 镜像源”,指定其他的镜像

  • 1.2 遇到的错误

错误1:Unknown or unsupported command 'install'

pip install jupyter notebook -i https://mirrors.aliyun.com/pypi/simple/
Unknown or unsupported command 'install'

原因是装了多个pip, 写成pip.exe加以区分。

where pip
C:\Dwimperl\perl\bin\pip
C:\Dwimperl\perl\bin\pip.bat
C:\Users\ehunjng\AppData\Local\Programs\Python\Python36\Scripts\pip.exe


错误2:提示缺少c++编译器

Microsoft Visual C++ 14.0 is required. Get it with "Build Tools for Visual Studio": https://visualstudio.microsoft.com/downloads/ Tools":

搜索的解决方法:

1) python -m pip install --upgrade pip

2) pip.exe install C:\simpleaudio-1.0.4-cp37-cp37m-win_amd64.whl(找对应python版本的安装包 https://pypi.org/project/simpleaudio/#files

3) 在线安装Microsoft Visual c++14.0 (可以在program and features里确认下是否安装)

image

云主机上没有安装, 在线安装Microsoft Visual C++ Build Tools, 安装不上。最后 使用1)解决问题。


  • 2.1 安装 jupyter notebook的代码提示插件jupyter_contrib_nbextensions
pip.exe install jupyter_contrib_nbextensions -i https://mirrors.aliyun.com/pypi/simple/
jupyter contrib nbextension install --user
jupyter notebook

 

  • 2.2 遇到的错误:
File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\IPython\core\completer.py", line 2030, in _complete
    cursor_pos, cursor_line, full_text)
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\IPython\core\completer.py", line 1374, in _jedi_matches
    text[:offset], namespaces, column=cursor_column, line=cursor_line + 1)
  File "c:\users\admin\appdata\local\programs\python\python36\lib\site-packages\jedi\api\__init__.py", line 726, in __init__
    project=Project(Path.cwd()), **kwds)
TypeError: __init__() got an unexpected keyword argument 'column'

jedi库版本不对,退回到0.17解决问题

pip.exe install jedi==0.17


  • 3.1使用

new—>python3

在每一个格子输入代码,然后点击run,会有代码运行结果

image

posted on 2021-10-14 22:10  维也纳下午茶  阅读(399)  评论(0编辑  收藏  举报