M1 Mac下miniconda环境中使用jupyter notebook时的一些问题

pandas无法调用

现象:出现ImportError: cannot import name 'is_numpy_dev'报错

解决办法:更新numpy&pandas包,修改 jupyter notebook 的默认目录

  1. pip3 install --upgrade numpy
  2. pip3 install --upgrade pandas
  3. 若仍然报错,继续修改 jupyter botebook 的默认目录(注意不要包含minianaconda目录)
  4. 打开终端输入,获取配置文件路径,复制路径jupyter notebook --generate-config
  5. 在 Finder 中找到对应配置文件并用编译器打开
  6. 搜索NotebookApp.notebook_dir,在后面补充想要选取的默认路径地址,并取消这一行的注释

参考:Mac下修改Jupyter Notebook的默认路径


打开ipynb文件时出现500报错

现象:出现500 : Internal Server Error报错

解决办法:更新nbconvert

Try upgrading jupyter hub first:
pip install --upgrade jupyterhub
pip install --upgrade --user nbconvert

If you are inside a conda environment, run the following command instead.
conda install nbconvert==5.4.1

参考:Jupyter Notebook 500 : Internal Server Error

你可能感兴趣的:(环境,macos,jupyter,python)