{ "cells": [ { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "## 0x01\n", "\n", "Linux迁移 Windows command 工具:\n", "\n", "- [cygwin](http://www.cygwin.com/) 类子系统\n", "- [gnuwin32](http://gnuwin32.sourceforge.net/)、[minGW](http://www.mingw.org/) 保持原生环境,尽可能提供类似的方案\n", "\n", "python环境问题:\n", "\n", "- pyenv+pipx+poetry\n", " - pyenv灵活地安装与切换python版本,搭配poetry可快速生成相应版本环境。\n", " - pipx升级依赖工具包方便,不用担心全局兼容问题。\n", " - 编译的程序通常会依赖各种包,这个要看开发者给出相应提示安装哪些包了。\n", "- miniconda、anaconda这类python发行版,依赖库齐全。\n", "\n", "jupyter 脚注问题:[jupyter/notebook#1287 (comment)](https://github.com/jupyter/notebook/issues/1287#issuecomment-451080550) ,另外注意此类方法需下载文件到本地才能正常使用。\n", "\n", "## 0x02\n", "\n", "安装 brew" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "vscode": { "languageId": "shellscript" } }, "outputs": [], "source": [ "/bin/bash -c \"$(curl -fsSL https://gitee.com/ineo6/homebrew-install/raw/master/install.sh)\"" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "安装 ruby" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "vscode": { "languageId": "shellscript" } }, "outputs": [], "source": [ "brew install ruby\n", "echo 'export PATH=\"/opt/homebrew/opt/ruby/bin:$PATH\"' >> ~/.zshrc" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "Chrome driver 驱动兼容问题:\n", "\n", "python利用管理器进行自动升级操作" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "from selenium import webdriver\n", "from webdriver_manager.chrome import ChromeDriverManager\n", "driver = webdriver.Chrome(ChromeDriverManager().install())" ] }, { "attachments": {}, "cell_type": "markdown", "metadata": {}, "source": [ "brew 安装 chromedriver" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "vscode": { "languageId": "shellscript" } }, "outputs": [], "source": [ "which chromedriver\n", "brew install chromedriver\n", "brew upgrade chromedriver\n", "chromedriver --version" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.11.4" }, "orig_nbformat": 4 }, "nbformat": 4, "nbformat_minor": 2 }