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

相关推荐
cmcm!1 分钟前
学习笔记1
数据库·笔记·学习
游戏开发爱好者822 分钟前
iOS 商店上架全流程解析 从工程准备到审核通过的系统化实践指南
android·macos·ios·小程序·uni-app·cocoa·iphone
Jay20021111 小时前
【机器学习】7-9 分类任务 & 逻辑回归的成本函数 & 逻辑回归的梯度下降
笔记·机器学习·分类
WXG10112 小时前
【Flask】前后端交互示例
笔记·学习
d111111111d3 小时前
STM32--SPI通讯外设-学习笔记
笔记·stm32·单片机·嵌入式硬件·学习
d111111111d3 小时前
在STM32中有参宏定义define该怎么使用
笔记·stm32·单片机·嵌入式硬件·学习
_可乐无糖3 小时前
活到老学到老之yt-dlp_macos(二)
macos
hai-chu3 小时前
将 Neo4j 安装为 macOS 服务
macos·策略模式·neo4j
远程软件小帮手4 小时前
UU远程上线mac被控!如何远程控制 macOS 设备办公?
游戏·macos·智能手机·电脑
2401_77CN5 小时前
汇川Easy系列PLC封装一阶低通滤波器FC【双线性变换】(定时中断应用,固定步长求解)
笔记·自动化