Python设置

时间:2022-07-23
本文章向大家介绍Python设置,主要内容包括其使用实例、应用技巧、基本知识点总结和需要注意事项,具有一定的参考价值,需要的朋友可以参考一下。

Pip安装包管理工具

  • Pip 先下载get-pip.py,然后用python或者python3运行之 pip无法运行:sudo easy_install pip 可以尝试:python3 -m pip install(search)... 下载get-pip.py,用python3运行之
  • pip 命令无法使用 在安装的过程中提示pip已经存在于环境变量了,那把环境变量里对应的文件删除掉 Library/Python/2.7/site-packages/pip-9.0.1-py2.7.egg pip3下载慢 解决网址 MacOS:~/.pip/pip.conf(~/是用户的根目录,一般是“/Users/你的MacOS账号名”。比如下面例子中配置文件位于/Users/lydias/.pip/pip.conf) /Users/你的MacOS账号名”。比如下面例子中配置文件位于/ Users/lydias/.pip/pip.conf) 文件内容
timeout = 6000
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
[install]
trusted-host=mirrors.aliyun.com

jupyter-notebook-python笔记本

  1. MAC OSX 正確地同時安裝 PYTHON 2.7 和 PYTHON3
  2. Mac下安装pip,virtualenv,IPython
  3. Mac下Jupyter(即IPython-notebook)的搭建及使用
  4. jupyter的extension
  5. jupyter不弹出网页
  6. 解决jupyter notebook 命令不能使用的问题pip install --upgrade --force-reinstall --no-cache-dir jupyter
  7. 暂时的token:67c9e60bb8b6:9ffede0825894254b2e042ea597d771089e11aed
  8. 启动命令 jupyter notebook
  9. jupyter extension 标签不提示,气动jupyter后,打开网页
  10. 修改默认启动目录:cd ~/.jupyter open -a coderunner.app jupyter_notebook_config.py 修改notebook_dir
  11. 运行python -m ipykernel install --user重新安装内核