当前位置: 首页 > news >正文

cmd: Union[List[str], str], ^ SyntaxError: invalid syntax

跑项目在调用from easyprocess import EasyProcess
遇到报错:

cmd: Union[List[str], str],        ^ SyntaxError: invalid syntax

猜测是EasyProcess版本与python版本不对应

pip show EasyProcess

查证一下:

WARNING: pip is being invoked by an old script wrapper. This will fail in a future version of pip.
Please see https://github.com/pypa/pip/issues/5599 for advice on fixing the underlying issue.
To avoid this problem you can invoke Python with '-m pip' instead of running pip directly.
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality.
Name: EasyProcess
Version: 1.1
Summary: Easy to use Python subprocess interface.
Home-page: https://github.com/ponty/easyprocess
Author: ponty
Author-email: UNKNOWN
License: BSD
Location: /home/xxx/anaconda3/envs/xxx/lib/python2.7/site-packages
Requires:
Required-by: PyVirtualDisplay

果然如此。
接下来更换EasyProcess版本,可以从EasyProcess中下载支持所用python的EasyProcess。
然后pip show EasyProcess
在这里插入图片描述

http://www.lryc.cn/news/148370.html

相关文章:

  • 2023高教社杯数学建模思路 - 案例:异常检测
  • FFDNet-pytorch版本代码测试教程
  • uni-app项目由hbuilder项目转化为cli项目
  • 使用SpaceDesk连接平板作为电脑副屏详细步骤教程
  • 云备份——第三方库使用介绍(下)
  • springboot实战(一)之项目搭建
  • 线性代数的学习和整理16:什么是各种空间(类型),向量空间,距离(类型)?
  • css实现文字翻转效果
  • 19 Linux之Python定制篇-apt软件管理和远程登录
  • WebDAV之π-Disk派盘 + notototo
  • _kbhit() and getch() 在小游戏中用不了。因为控制台函数,仅在控制台程序中可用
  • dayjs格式转换成日期
  • mfc140u.dll丢失如何修复?解析mfc140u.dll是什么文件跟修复方法分享
  • STM32--SPI通信与W25Q64(2)
  • 微信小程序 校园周边美食商城分享系统
  • K8S - 架构、常用K8S命令、yaml资源清单部署、Ingress、故障排查、存储卷
  • micro benchmark 使用经验
  • nodejs发布静态https服务器
  • 国产系统下开发QT程序总结
  • 【Redis】redis入门+java操作redis
  • 无涯教程-Android - Spinner函数
  • 国标GB28181视频平台EasyGBS国标平台智能边缘计算网关关于小区电动车进电梯的应用方案设计
  • supervisorctl(-jar)启动配置设置NACOS不同命名空间
  • 如何解决 Out Of Memory 的问题
  • 代码随想录训练营二刷第九天 | 字符串结束
  • javaee spring jdbcTemplate的使用
  • qt day
  • Configurable Weather Parameters
  • MySQL 8 数据清洗总结
  • 设计模式第九讲:常见重构技巧 - 去除不必要的!=