【笔记】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 小时前
【C 语言】(二)模拟实现 strlen、strcpy、strcmp、strstr、memcpy、memmove
c语言·开发语言·笔记·学习
大连好光景2 小时前
腾讯云 ADP 前沿部署工程师 (FDE) 学习笔记(二)
笔记·学习·agent开发平台·adp·实战练习
虎符饼干12 小时前
AI写出的产品介绍与技术文档不一致,品牌知识库应怎样整理事实与使用条件?
笔记
虎符饼干16 小时前
CMS对接与WebHook内容推送怎样选择?现有建站系统与自建官网的接入条件
笔记
 梦晓天明17 小时前
1.Spring学习笔记_IOC入门案例
笔记·学习·spring
晚霞的不甘20 小时前
Flutter/OpenHarmony 三方库适配实战:google_maps_flutter 地图
flutter·macos·华为·cocoa·harmonyos·1024程序员节
吃我一窝jio21 小时前
Python与Redis集合深度解析
开发语言·redis·笔记·python
饮水桶_T1 天前
Git笔记
开发语言·笔记·算法
H H.1 天前
Java笔记:String字符串
java·开发语言·经验分享·笔记·其他
sharemylove1 天前
Java 异常处理 学习笔记
java·开发语言·经验分享·笔记·学习