首页 > 其他分享 >关于使用 conda create -n blog_project 创建项目的时候报错问题

关于使用 conda create -n blog_project 创建项目的时候报错问题

时间:2024-05-31 16:12:51浏览次数:29  
标签:Lib ProgramData create py project conda anaconda3 报错 line

大致报错如下:

    Traceback (most recent call last):
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\cli\main.py", line 64, in main_subshell
        exit_code = do_call(args, parser)
                    ^^^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\cli\conda_argparse.py", line 167, in do_call
        result = getattr(module, func_name)(args, parser)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\notices\core.py", line 124, in wrapper
        return func(*args, **kwargs)
               ^^^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\cli\main_create.py", line 50, in execute
        install(args, parser, "create")
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\cli\install.py", line 316, in install
        unlink_link_transaction = solver.solve_for_transaction(
                                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\solve.py", line 174, in solve_for_transaction
        self._notify_conda_outdated(link_precs)
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\solve.py", line 1224, in _notify_conda_outdated
        SubdirData.query_all(
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\subdir_data.py", line 158, in query_all
        result = tuple(
                 ^^^^^^
      File "E:\ProgramData\anaconda3\Lib\concurrent\futures\_base.py", line 619, in result_iterator
        yield _result_or_cancel(fs.pop())
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\concurrent\futures\_base.py", line 317, in _result_or_cancel
        return fut.result(timeout)
               ^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\concurrent\futures\_base.py", line 449, in result
        return self.__get_result()
               ^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\concurrent\futures\_base.py", line 401, in __get_result
        raise self._exception
      File "E:\ProgramData\anaconda3\Lib\concurrent\futures\thread.py", line 58, in run
        result = self.fn(*self.args, **self.kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\subdir_data.py", line 143, in subdir_query
        return tuple(
               ^^^^^^
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\subdir_data.py", line 165, in query
        self.load()
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\subdir_data.py", line 265, in load
        _internal_state = self._load()
                          ^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\core\subdir_data.py", line 322, in _load
        repodata, state = fetcher.fetch_latest_parsed()
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\gateways\repodata\__init__.py", line 758, in fetch_latest_parsed
        parsed, state = self.fetch_latest()
                        ^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\gateways\repodata\__init__.py", line 820, in fetch_latest
        cache.load_state()
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\gateways\repodata\__init__.py", line 626, in load_state
        self.load(state_only=True)
      File "E:\ProgramData\anaconda3\Lib\site-packages\conda\gateways\repodata\__init__.py", line 576, in load
        state = json.loads(state_file.read())
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\json\__init__.py", line 346, in loads
        return _default_decoder.decode(s)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "E:\ProgramData\anaconda3\Lib\json\decoder.py", line 340, in decode
        raise JSONDecodeError("Extra data", s, end)
    json.decoder.JSONDecodeError: Extra data: line 9 column 2 (char 280)

  需要根据报错信息来解决,下面提供两种解决方式:

第一种:

1.清除 conda 配置:

conda config --remove-key channels

2.重新配置 conda

conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda

第二种:

在windos 找user下的.conda文件,清空envs和pkgs

标签:Lib,ProgramData,create,py,project,conda,anaconda3,报错,line
From: https://www.cnblogs.com/Gaze/p/18224735

相关文章

  • vue 导出xlsx (报错./cptable in ./node modules/xlsx-style/dist/cpexcel.js)
    安装 xlsx 和  xlsx-stylesrc下创建文件夹utils, utils文件夹下创建index.js文件,index.js文件内容如下:*CreatedbyAnqion16/11/18.*//***Parsethetimetostring*@param{(Object|string|number)}time*@param{string}cFormat*@returns{stri......
  • go tool compile 报错 could not import sync (file not found)
    前言Go版本:$goversiongoversiongo1.21.4darwin/amd64我想对go文件进行反汇编,然后就报错了:$gotoolcompile-Srace.gorace.go:3:8:couldnotimportsync(filenotfound)我就惊讶了一下,标准库怎么还能找不到呢?难道是我GOROOT配置错了?发现了问题原因原......
  • 安装并运行pytorch报错“核心已转储”
    1问题和解决概要主机环境:Ubuntu20.04,RTX3090,GPUDriverVersion525.89.02问题:用anaconda创建虚拟环境python3.10,安装pytorch2.2.2-cu118和对应torchvision后,训练模型出现报错:“核心已转储”。定位和解决:查阅资料,确认driver支持cuda-11.8,主机安装cuda-11.8后编译一个sample......
  • 新版Python安装,新手入门必看,报错分析
    第一次接触Python的朋友,可能会在安装的过程中遇到很多问题,下面会详细的指出可能出现的各种状况、以及应对方法,让新入行的朋友也可上手安装,并且完成第一个Helloworld代码。【Python安装】一、打开python官网点击下载搜索并打开官网进入页面后点击导航中的Downloads进入下载......
  • SQL Server报错:数据库"YourDatabaseName"的事务日志已满,原因为"LOG_BACKUP"
      通过以下代码可以收缩日志,执行完后就不报错了。--设置简单模式USE[master]GOALTERDATABASEYourDatabaseNameSETRECOVERYSIMPLEWITHNO_WAITGOALTERDATABASEYourDatabaseNameSETRECOVERYSIMPLEGO--设置压缩后的日志大小为2M,可自定义USEY......
  • 【Spring Security】Error:A granted authority textual representation is required
     Security出错了! 分析:Debug跑后 排查是Security中的UserDetails.getAuthorities()在创建SimpleGrantedAuthorityauthority时,所传递的授权信息是空的,导致SimpleGrantedAuthorityauthority出现异常;报出Agrantedauthoritytextualrepresentationisreq......
  • 关于Interrupted system call 报错
    Socket编程或者其他的一些慢速系统调用中,我们经常会碰到“interruptedsystemcall”的问题。这些系统调用包括:长时间读取磁盘,等待网络连接i.e.Accept,阻塞的系统调用,i.e.Read/Writeepoll_wait/kevent这是因为系统调用在执行过程中有可能收到来自外部的信号中断,那么该系......
  • python爬虫不报错也不出结果?
    刚学爬虫对着视频想爬个网络小说但是代码写完不报错也不出结果,大佬们帮忙看看啥情况importreimportrequestsfromlxmlimportetreeheaders={"User-Agent":"Mozilla/5.0(WindowsNT10.0;Win64;x64)AppleWebKit/537.36(KHTML,likeGecko)Chrome/125.0.0......
  • MongoDB CRUD操作:投影Project详解
    MongoDBCRUD操作:投影Project详解文章目录MongoDBCRUD操作:投影Project详解返回文档的全部字段返回指定的字段和_id字段不输出_id字段指定排除的字段返回内嵌文档中的指定字段禁止内嵌文档中的特定字段数组中内嵌文档的投影聚合表达式的投影字段默认情况下,MongoDB查......
  • SpringBoot升级到3.2.0报错Invalid value type for attribute ‘factoryBeanObjectTyp
    1现象SpringBoot由3.1.0升级为3.2.0时报的错:直接debug进入该行,看到报错的bean信息:看到是MyBatis出问题。2处理MyBatis先想到mybatis-spring版本较低导致。大家应该都用的MyBatisPlus,其实可暂缓升级3.2,等待一段时间,升级MyBatisPlus即可,目前MyBatisPlus的mybatis-spring......