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

相关推荐
EQ-雪梨蛋花汤31 分钟前
【Unity笔记】Unity音视频播放监听器封装笔记:VideoPlayer + AudioSource事件触发与编辑器扩展
笔记·unity·音视频
pumpkin845142 小时前
学习笔记二十二—— 并发五大常见陷阱
笔记·学习
豆沙沙包?2 小时前
4.黑马学习笔记-SpringMVC(P43-P47)
笔记·学习
V功夫兔2 小时前
Spring_MVC 高级特性详解与实战应用
java·经验分享·笔记·spring
moxiaoran57532 小时前
Kubernetes(k8s)学习笔记(二)--k8s 集群安装
笔记·学习·kubernetes
孤寂码农_defector3 小时前
鸿蒙系统的 “成长烦恼“:生态突围与技术迭代的双重挑战
macos·华为·objective-c·cocoa·harmonyos
方始终_3 小时前
亲测有效,如何macOS上卸载并且重新安装homeBrew
前端·后端·macos
姝孟3 小时前
学习笔记(C++篇)--- Day 3
c++·笔记·学习
xixixiLucky4 小时前
RESTful学习笔记(二)---简单网页前后端springboot项目搭建
笔记·学习
依旧风轻4 小时前
iOS 冷启动时间监控:启动起点有哪些选择?
macos·ios·cocoa·sqi·coldstart