【笔记】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

相关推荐
是上好佳佳佳呀16 小时前
【深度学习|Day01】PyTorch 深度学习笔记(上):框架认知与张量基础
pytorch·笔记·深度学习
YH552698416 小时前
MacBook Air M4 和 M5 怎么选?
macos
x173880627316 小时前
目录遍历漏洞
笔记·目录遍历漏洞
MoSTChillax17 小时前
数字人竞品分析(中):核心功能、产品使用与技术能力对比
ide·macos·xcode
砚凝霜17 小时前
软考网络工程师|第 5 章 广域网基础技术完整备考笔记
网络·笔记
oier_Asad.Chen17 小时前
【OI学习笔记】Floyed-Warshall算法解决传递闭包问题
c++·笔记·学习·算法·图论·最短路·传递闭包
鱼听禅18 小时前
C#学习笔记-添加编译参数到程序集自动更新程序编译时间
笔记·学习·c#
香菜TTT18 小时前
LangChain框架_学习笔记
笔记·学习·langchain
春水碧于天,画船听雨眠18 小时前
LangChain学习笔记(二)
笔记·学习·langchain
210Brian19 小时前
STM32学习笔记(四)OLED显示屏与Keil调试
笔记·stm32·学习