ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none)

Posted 秋秋2021

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none)相关的知识,希望对你有一定的参考价值。

踩过的坑

不管是idea中直接引入还是 pip3 install pymysql 都会报错:ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none)

 

 

原因是 网络问题,需要需要使用国内镜像源来加速,比如豆瓣源

pip install pymysql -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com

 

解决问题参考:https://blog.csdn.net/T_Y_F_/article/details/126225407,感谢博主分享

 

ERROR StatusLogger Log4j2 could not find a logging

环境

  • Linux/Ubuntu20.04LTS
  • IntelliJ IDEA Community Editon 2021.1
  • maven 3.6.3
  • jetty 11.0.5
  • struts2 2.5.14.1

异常

ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...

使用mvn jetty:run插件来运行web应用,出现异常!

原因

缺少了日志类Log4j2相应的包

方案

  1. 缺少log4j-core包,在配置文件pom.xml添加相应的依赖
 <dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-core</artifactId>
    <version>2.14.1</version>
</dependency>

在项目resources下配置日志输出格式文件log4j2.xml

<?xml version="1.0" encoding="UTF-8"?>
<Configuration>
    <Appenders>
        <Console name="STDOUT" target="SYSTEM_OUT">
            <PatternLayout pattern="%d %-5p [%t] %C{2} (%F:%L) - %m%n"/>
        </Console>
    </Appenders>
    <Loggers>
        <Logger name="com.opensymphony.xwork2" level="debug"/>
        <Logger name="org.apache.struts2" level="debug"/>
        <Root level="warn">
            <AppenderRef ref="STDOUT"/>
        </Root>
    </Loggers>
</Configuration>

或是log4j.properties

    log4j.rootLogger=WARN, console
    log4j.appender.console=org.apache.log4j.ConsoleAppender
    log4j.appender.console.layout=org.apache.log4j.PatternLayout
    log4j.appender.console.layout.conversionPattern=%5p [%t] (%F:%L) - %m%n

从 Struts 2.2.3 版开始 您不需要为 javassist 指定单独的依赖项节点。

使用两者 log4j-corelog4j-api允许使用 最新版本的 Log4j2 而不会与框架提供的版本发生冲突。

参考

  • https://mvnrepository.com/art...

说明

  • 【遇上雨季,吃定彩虹】 --Layuji
  • 由个人整理发布,编写过程难免有所遗漏或错误,恳请指出,以免误导大家!

以上是关于ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none)的主要内容,如果未能解决你的问题,请参考以下文章

解决ERROR: Could not find a version that satisfies the requirement 问题及 ERROR: Exception:Traceback

jsonpath安装失败--ERROR: Could not find a version that satisfies the requirement jsonpath

pip install yaml报错ERROR:Could not find a version that satisfies the requirement yaml

成功解决ERROR: Could not find a version that satisfies the requirement xgboost (from versions: none) ERR

ERROR: Could not find a version that satisfies the requirement xxx (from versions: none)

ERROR: Could not find a version that satisfies the requirement pymysql (from versions: none)