【笔记】Mac M1上miniforge3与tushare的安装

Mac M1上从头安装了miniforge3与tushare。记录一下步骤。

起因是在自己的Mac M1上安装tushare报了这个错,正好环境时间比较长了,于是删除干净从头安装了一遍。

Building wheels for collected packages: lxml
  Building wheel for lxml (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [121 lines of output]
      Building lxml version 5.0.0.
  1. 首先移除上一版miniforge,没有安装过miniforge的朋友请忽略这个步骤。

    rm -rf $(conda info --base)

https://blog.csdn.net/qq_39043714/article/details/125019041

  1. 编辑~/.zshrc,删除conda相关的初始化脚本

    vi ~/.zshrc

  2. 下载miniforge安装包至Downloads
    https://github.com/conda-forge/miniforge

  3. 安装

    bash ~/Downloads/Miniforge3-MacOSX-arm64.sh

  4. 重新登录terminal初始化,并添加清华镜像加速包安装

    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
    conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
    conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/fastai/
    conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
    conda config --append channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/
    conda config --set show_channel_urls yes

https://blog.csdn.net/yhblog/article/details/121629975

  1. 建立conda环境py

    conda create -n py
    conda activate py

  2. 安装numpy和pandas

    conda install numpy pandas lxml

  3. 安装tushare

    pip install tushare

  4. 验证安装效果

    python
    import tushare

相关推荐
吃汤圆的抹香鲸1 小时前
GoLand 安装包 绿色版 Win,Mac,Linux 包含IntelliJ全家桶 专为Go语言设计的集成开发环境(IDE)
linux·windows·macos·go·intellij-idea·go1.19
吃汤圆的抹香鲸2 小时前
Rider 安装包 绿色版 Win/Mac/Linux 适合.NET和游戏开发者使用 2025全栈开发终极指南:从零配置到企业级实战
linux·运维·windows·sql·游戏·macos·.net
cwtlw9 小时前
PhotoShop学习01
笔记·学习·ui·photoshop
远离UE49 小时前
UE5 Computer Shader学习笔记
笔记·学习·ue5
cmc102811 小时前
47.matlab 中filter design工具设计的滤波器如何在.m代码中调用
笔记
SHIZHK11 小时前
ArcGis若干问题
笔记
甜于酸13 小时前
MuMu模拟器Pro for Mac 安卓手机平板模拟器
android·macos·智能手机
渔夫阿布13 小时前
在MAC上面通过HomeBrew安装node和npm@指定版本
前端·macos·npm
waicsdn_haha14 小时前
TeX Live 2025 最新版安装与中文环境配置全教程(Windows/Mac/Linux)
linux·windows·macos·论文笔记·sublime text·mdk·嵌入式开发工具
Long_poem14 小时前
【自学笔记】Vue基础知识点总览-持续更新
前端·vue.js·笔记