anaconda 安装后运行报错 OSError: [WinError 123] 文件名、目录名或卷标语法不正确

文章讲述了用户在使用conda进行软件安装时遇到的错误,错误源于系统环境变量PATH中包含的NsightCompute相关文件路径格式不正确。解决方法是删除这个错误路径并重启命令行执行conda命令。
摘要由CSDN通过智能技术生成

我的报错信息如下:

# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "F:\anaconda\lib\site-packages\conda\exception_handler.py", line 17, in __call__
        return func(*args, **kwargs)
      File "F:\anaconda\lib\site-packages\conda\cli\main.py", line 54, in main_subshell
        parser = generate_parser(add_help=True)
      File "F:\anaconda\lib\site-packages\conda\cli\conda_argparse.py", line 127, in generate_parser
        configure_parser_plugins(sub_parsers)
      File "F:\anaconda\lib\site-packages\conda\cli\conda_argparse.py", line 354, in configure_parser_plugins
        else set(find_commands()).difference(plugin_subcommands)
      File "F:\anaconda\lib\site-packages\conda\cli\find_commands.py", line 71, in find_commands
        for entry in os.scandir(dir_path):
    OSError: [WinError 123] 文件名、目录名或卷标语法不正确。: 'C:\\Program Files\\NVIDIA Corporation\\Nsight Compute 2022.3.0\\C:\\Users\\lenovo\\Downloads\\Antdownload_v3.0.3\\config\\maria2c.exe'

`$ F:\anaconda\Scripts\conda-script.py env list`

  environment variables:
                 CIO_TEST=<not set>
                CLASSPATH=F:\gcd\env\openjdk8\lib
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=F:\anaconda\condabin\..\Scripts\conda.exe
               CONDA_EXES="F:\anaconda\condabin\..\Scripts\conda.exe"
             CONDA_PREFIX=F:\anaconda
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=F:\anaconda\python.exe
               CONDA_ROOT=F:\anaconda
              CONDA_SHLVL=1
                CUDA_PATH=F:\cuda
           CURL_CA_BUNDLE=<not set>
                 HOMEPATH=\Users\lenovo
               LD_PRELOAD=<not set>
          NVTOOLSEXT_PATH=C:\Program Files\NVIDIA Corporation\NvToolsExt\
                     PATH=F:\anaconda;F:\anaconda\Library\mingw-w64\bin;F:\anaconda\Library\usr\
                          bin;F:\anaconda\Library\bin;F:\anaconda\Scripts;F:\anaconda\bin;F:\ana
                          conda\condabin;F:\cuda\bin;F:\cuda\libnvvp;C:\Users\lenovo\python;C:\U
                          sers\lenovo\Scripts;C:\Users\lenovo;C:\Program Files (x86)\Intel\iCLS
                          Client;C:\Program Files\Intel\iCLS Client;C:\Windows\system32;C:\Windo
                          ws;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0
                          ;C:\Program Files (x86)\Intel\Intel(R) Management Engine
                          Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine
                          Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine
                          Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine
                          Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;
                          C:\Users\lenovo\Desktop\runtime\win64;C:\Users\lenovo\Desktop\bin;C:\W
                          INDOWS\System32\OpenSSH;C:\Program Files\NVIDIA Corporation\NVIDIA
                          NvDLISR;C:\Program Files (x86)\Microsoft SQL
                          Server\100\Tools\Binn;C:\Program Files\Microsoft SQL
                          Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Bi
                          nn;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\
                          System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;F:\spss25\
                          JRE\bin;F:\rtools\rtools42\usr\bin;F:\rtools\rtools42\x86_64-w64-mingw
                          32.static.posix;F:\gcd\MySql;F:\gcd\MySql\bin;F:\gcd\env\openjdk8\bin;
                          F:\gcd;F:\gcd\env\openjdk8\jre\bin;F:\matlab\bin;C:\Users\lenovo\pytho
                          n\Scripts;C:\Program Files\NVIDIA Corporation\Nsight Compute
                          2022.3.0;F:\R_LIBS;D:\360鏋侀€熸祻瑙堝櫒涓嬭浇\L2D
                          ins\ChatWaifuL2D\ffmpeg-n4.4-latest-win64-gpl-4.4\bin;.;F:\anaconda\gi
                          t\Git\cmd;F:\anaconda\Lib\Graphviz\bin;F:\cuda\bin;F:\cuda\libnvvp;C:\
                          Users\lenovo\python;C:\Users\lenovo\Scripts;C:\Users\lenovo;C:\Program
                          Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Wi
                          ndows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
                          \WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R)
                          Management Engine Components\DAL;C:\Program Files\Intel\Intel(R)
                          Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R)
                          Management Engine Components\IPT;C:\Program Files\Intel\Intel(R)
                          Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corpora
                          tion\PhysX\Common;C:\Users\lenovo\Desktop\runtime\win64;C:\Users\lenov
                          o\Desktop\bin;C:\WINDOWS\System32\OpenSSH;C:\Program Files\NVIDIA
                          Corporation\NVIDIA NvDLISR;C:\Program Files (x86)\Microsoft SQL
                          Server\100\Tools\Binn;C:\Program Files\Microsoft SQL
                          Server\100\Tools\Binn;C:\Program Files\Microsoft SQL Server\100\DTS\Bi
                          nn;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\
                          System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;F:\spss25\
                          JRE\bin;F:\rtools\rtools42\usr\bin;F:\rtools\rtools42\x86_64-w64-mingw
                          32.static.posix;F:\gcd\MySql;F:\gcd\MySql\bin;F:\gcd\env\openjdk8\bin;
                          F:\gcd;F:\gcd\env\openjdk8\jre\bin;F:\matlab\bin;C:\Users\lenovo\pytho
                          n\Scripts;C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.3.0\
                          C:\Users\lenovo\Downloads\Antdownload_v3.0.3\config\maria2c.exe;.;F:\p
                          ycharm\PyCharm Community Edition 2022.3.3\bin;.
             PSMODULEPATH=C:\Users\lenovo\Documents\WindowsPowerShell\Modules;
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : base
    active env location : F:\anaconda
            shell level : 1
       user config file : C:\Users\lenovo\.condarc
 populated config files : C:\Users\lenovo\.condarc
          conda version : 23.7.4
    conda-build version : 3.24.0
         python version : 3.9.16.final.0
       virtual packages : __archspec=1=x86_64
                          __win=0=0
       base environment : F:\anaconda  (writable)
      conda av data dir : F:\anaconda\etc\conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : F:\anaconda\pkgs
                          C:\Users\lenovo\.conda\pkgs
                          C:\Users\lenovo\AppData\Local\conda\conda\pkgs
       envs directories : F:\anaconda\clone
                          F:\anaconda\envs
                          C:\Users\lenovo\.conda\envs
                          C:\Users\lenovo\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/23.7.4 requests/2.29.0 CPython/3.9.16 Windows/10 Windows/10.0.19045
          administrator : False
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.
If you suspect this error is being caused by a malfunctioning plugin,
consider using the --no-plugins option to turn off plugins.

Example: conda --no-plugins install <package>

Alternatively, you can set the CONDA_NO_PLUGINS environment variable on
the command line to run the command without plugins enabled.

Example: CONDA_NO_PLUGINS=true conda install <package>

If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers? [y/N]: y
Upload successful.

Thank you for helping to improve conda.
Opt-in to always sending reports (and not see this message again)
by running

    $ conda config --set report_errors true

解决方法:

删除系统环境变量 PATH 中的 C:\Program Files\NVIDIA Corporation\Nsight Compute 2022.3.0\C:\Users\lenovo\Downloads\Antdownload_v3.0.3\config\maria2c.exe (即报错的 文件名、目录名或卷标语法不正确 的路径)

然后重新打开cmd运行conda命令

系统环境变量位置:
1、右击此电脑->属性 打开系统控制面板
2、点击高级系统设置
在这里插入图片描述
3、点击环境变量
在这里插入图片描述
4、在系统变量中找到 PATH
在这里插入图片描述
5、点击编辑找到报错的环境配置,删除

  • 9
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

weixin_44003104

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值