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

相关推荐
Coolbike6 小时前
《深度探索C++对象模型》笔记
c++·笔记
许小禾上学记7 小时前
学习笔记 | 图论基础
笔记·学习·图论
骁的小小站10 小时前
Verilator 和 GTKwave联合仿真
开发语言·c++·经验分享·笔记·学习·fpga开发
kkkkk02110610 小时前
软考高级-系统架构设计师案例专题三:系统开发基础
笔记·系统架构
新子y14 小时前
【小白笔记】区分类方法/实例方法和静态函数/命名空间函数
笔记·分类
梁辰兴15 小时前
企业培训笔记:外卖平台后端--套餐管理模块--新建套餐信息
笔记·vue·mybatis·springboot·外卖管理系统
degen_15 小时前
第一次进入 PEICORE 流程
c语言·笔记
YJlio15 小时前
Process Monitor 学习笔记(5.24):工具栏参考与高效快捷键指南
笔记·学习·php
摇滚侠16 小时前
Spring Boot 3零基础教程,WEB 开发 Thymeleaf 核心语法 笔记39
spring boot·笔记·后端·thymeleaf
张人玉16 小时前
WPF 常用样式属性及示例笔记
笔记·wpf