由于使用公司电脑,python环境变量设置有写差错,一直出现问题

问题一环境变量设置

把电脑python安装的地址及个人配置的地址均设置为环境变量

 环境变为结尾为:

\Python\Python39\Scripts

原本终端运行python的前面必须添加python -m,直接运行安装包会报错,如下图所示

C:\Users\liangsh.PVI>pip install canmatrix
'pip' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

卸载pip重新安装,卸载pip

python -m ensurepip

安装pip

python -m pip install --upgrade pip

发现我安装的pip默认安装路径不对,默认路径在\Python\Python39\Scripts中

将pip从\Python\Python39\Scripts复制到上一级菜单,即\Python\Python39目录下即可

原本终端运行python的前面必须添加python -m

安装pip install canmatrix

pip install canmatrix

同样的,不能直接运行canconvert指令,将canconvert等几个exe从\Python\Python39\Scripts复制到上一级菜单,即\Python\Python39目录下即可

canconvert test.dbc test234.xlsx

会出现如下报错

arxml is not supported
ldf is not supported
kcd is not supported
fibex is not supported
yaml is not supported
odx is not supported

小白玩python,环境变量坑比较多,尤其是使用公司电脑,权限限制比较多,写个笔记记录一下这两天掉的头发~主要是作为备忘录

Logo

为开发者提供学习成长、分享交流、生态实践、资源工具等服务,帮助开发者快速成长。

更多推荐