mac电脑下pip安装库后,仍然提示command not found

如:pip install httprunner,安装成功后输入hrun -V 提示"command not found"。

造成这个问题的原因是PATH环境变量的问题,因为使用的是homebrew安装的python,导致pip bin目录的环境变量没注册上。

解决办法是将python bin目录加入环境变量。

1.打开终端,进vi编辑器

bash 复制代码
vi ~/.bash_profile

2.添加一行

bash 复制代码
export PATH=${PATH}:你的python安装bin目录

3.刷新配置文件

bash 复制代码
source ~/.bash_profile
相关推荐
sg_knight2 小时前
Claude Code 安装指南(macOS / Linux / Windows WSL)
linux·windows·macos·claude·code·anthropic·claude-code
2601_9615934211 小时前
Rust 开发环境配置繁琐?RustRover 开箱即用搞定编码调试
开发语言·后端·macos·rust
在水一缸12 小时前
拒绝被打扰:深度解析 macOS 进程守护与“反自动启动”攻防战
macos·策略模式·用户体验·进程守护·自动启动·系统权限
REDcker17 小时前
macOS 挂载 Linux 远程目录详解
linux·运维·macos
2601_9615934217 小时前
Mac 上搭建Linux环境吗?VMware + CentOS Stream 9 镜像快速部署
linux·运维·ide·macos·centos
陪我去看海19 小时前
受够了 AI 写完代码留下一堆端口?我做了一个端口管理App!
前端·macos·vibecoding
发光的沙子20 小时前
FPGA----配置根文件系统ip和mac地址
网络协议·tcp/ip·macos
2601_961593421 天前
Mac 虚拟机跑 Linux 选哪个?CentOS 8 稳定版适配方案
linux·macos·centos
IT·陈寒1 天前
macOS 安装 Claude Code 全流程
人工智能·macos·策略模式