Can‘t use openai in command prompt

**题意:**在命令提示符(Command Prompt)中不能使用OpenAI

问题背景:

I know this is a super basic question but pls help me with this problem I have properly installed the openai with the nodejs library using npm install openai openai docs and updated them but when working on fine tuning my model it throws an error openai is not recognized as as internal or external command operable program or batch file and is installed at this location C:\Users\Desktop\openaimodel\node_modules\openai

我知道这是一个非常基础的问题,但请帮我解决这个难题。我已经正确地使用 npm install openai 命令安装了 OpenAI 的 Node.js 库,并查看了 OpenAI 的文档,我也更新了它们。但是,当我在微调我的模型时,它抛出了一个错误:"openai"不是内部或外部命令,也不是可运行的程序或批处理文件"。然而,OpenAI 库是安装在 C:\Users\Desktop\openaimodel\node_modules\openai 这个位置的。

问题解决:

For Python developers If openai command not found in Windows command prompt add this path to your Path variable in Environment Variables :

对于Python开发者:如果在Windows命令提示符中找不到openai命令,请将以下路径添加到环境变量的Path变量中:

cs 复制代码
C:\Users\{YourUsername}\appdata\roaming\python\python{-PythonVersion}\Scripts

Replace the {YourUsername} with your Windows username and the {-PythonVersion} with your current Python version.

{YourUsername}替换为您的Windows用户名,将{-PythonVersion}替换为您当前的Python版本号

相关推荐
刺客-Andy2 小时前
前端加密方式 AES对称加密 RSA非对称加密 以及 MD5哈希算法详解
前端·javascript·算法·哈希算法
记得早睡~2 小时前
leetcode122-买卖股票的最佳时机II
javascript·数据结构·算法·leetcode
拉不动的猪3 小时前
react基础2
前端·javascript·面试
kovlistudio3 小时前
红宝书第二十九讲:详解编辑器和IDE:VS Code与WebStorm
开发语言·前端·javascript·ide·学习·编辑器·webstorm
拉不动的猪3 小时前
react基础1
前端·javascript·面试
烛阴3 小时前
从零到RESTful API:Express路由设计速成手册
javascript·后端·express
ElasticPDF-新国产PDF编辑器3 小时前
Vue PDF Annotation plugin library online API examples
javascript·vue.js·pdf
鱼樱前端3 小时前
Vite 工程化深度解析与最佳实践
前端·javascript
鱼樱前端3 小时前
Webpack 在前端工程化中的核心应用解析-构建老大
前端·javascript
Moment3 小时前
多人协同编辑算法 —— CRDT 算法 🐂🐂🐂
前端·javascript·面试