MAC 使用问题汇总

1. 在.zshrc中添加的环境变量不起作用

Answer: 需要把/etc/zshrc文件复制到 ~, 并命名为.zshrc,然后设置环境变量即可;

2. 创建python虚拟环境

    python3 -m venv myvenv

   2.1 python安装:pyenv install 3.12.3

   2.2 python设置全局:pyenv global 3.12.3

  2.3 在项目中使用特定版本: 在项目目录下,创建一个 .python-version 文件,内容为 3.12.3

     echo 3.12.3 > .python-version;
pyenv

3. U 盘启动制作

terminal输入: sudo /Applications/Install\ macOS\ Ventura.app/contents/Resources/createinstallmedia --volume /Volumes/MyVolume

Error: Error Domain=NSCocoaErrorDomain Code=513 "未能拷贝“安装macOS Ventura”,因为你没有访问“Install macOS Ventura”的许可。" UserInfo={NSSourceFilePathErrorKey=/Applications/Install macOS Ventura.app, NSUserStringVariant=(   Copy ), NSDestinationFilePath=/Volumes/Install macOS Ventura/Install macOS Ventura.app, NSFilePath=/Applications/Install macOS Ventura.app, NSUnderlyingError=0x60000393f600 {Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted"}}The copy of the installer app failed.

The bless of the installer disk failed.

原因:

输入的createinstallmedia目录路径不正确,contents应为大些,与实际路径要完全一致,

修改为:sudo /Applications/InstallmacOSVentura.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume, 问题解决;

4. Homebrew 国内安装:

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

5. mac下无法安装pypdf2

Could not fetch URL https://pypi.org/simple/pypdf2/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pypdf2/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

解决方法:

brew install openssl

posted @   jiguanghover  阅读(4)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· winform 绘制太阳,地球,月球 运作规律
· AI与.NET技术实操系列(五):向量存储与相似性搜索在 .NET 中的实现
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
· 上周热点回顾(3.3-3.9)
· AI 智能体引爆开源社区「GitHub 热点速览」
点击右上角即可分享
微信分享提示