前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >使用torchvision时报错:ModuleNotFoundError: No module named ‘six‘

使用torchvision时报错:ModuleNotFoundError: No module named ‘six‘

作者头像
全栈程序员站长
发布2022-09-12 10:59:00
1K0
发布2022-09-12 10:59:00
举报
文章被收录于专栏:全栈程序员必看

大家好,又见面了,我是你们的朋友全栈君。

刚开始在Anaconda Powershell Prompt中输入:

代码语言:javascript
复制
conda install six

报错如下:

代码语言:javascript
复制
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<

    Traceback (most recent call last):
      File "F:\Anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
        return func(*args, **kwargs)
      File "F:\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
        exit_code = do_call(args, p)
      File "F:\Anaconda3\lib\site-packages\conda\cli\conda_argparse.py", line 83, in do_call
        return getattr(module, func_name)(args, parser)
      File "F:\Anaconda3\lib\site-packages\conda\cli\main_install.py", line 20, in execute
        install(args, parser, 'install')
      File "F:\Anaconda3\lib\site-packages\conda\cli\install.py", line 116, in install
        if context.use_only_tar_bz2:
      File "F:\Anaconda3\lib\site-packages\conda\base\context.py", line 713, in use_only_tar_bz2
        import conda_package_handling.api
      File "F:\Anaconda3\lib\site-packages\conda_package_handling\api.py", line 6, in <module>
        from six import string_types as _string_types
    ModuleNotFoundError: No module named 'six'

`$ F:\Anaconda3\Scripts\conda-script.py install six`

  environment variables:
                 CIO_TEST=<not set>
                CLASSPATH=.;E:\Program Files\Java\jdk1.8.0_131\lib\dt.jar;E:\Program
                          Files\Java\jdk1.8.0_131\lib\tools.jar;D:\LINGO64_17\Lingo17.jar
        CONDA_DEFAULT_ENV=base
                CONDA_EXE=F:\Anaconda3\Scripts\conda.exe
             CONDA_PREFIX=F:\Anaconda3
    CONDA_PROMPT_MODIFIER=(base)
         CONDA_PYTHON_EXE=F:\Anaconda3\python.exe
               CONDA_ROOT=F:\Anaconda3
              CONDA_SHLVL=1
           CURL_CA_BUNDLE=<not set>
                 HOMEPATH=\Users\KI
                     PATH=F:\Anaconda3;F:\Anaconda3\Library\mingw-w64\bin;F:\Anaconda3\Library\u
                          sr\bin;F:\Anaconda3\Library\bin;F:\Anaconda3\Scripts;F:\Anaconda3\bin;
                          F:\Anaconda3;F:\Anaconda3\Library\mingw-w64\bin;F:\Anaconda3\Library\u
                          sr\bin;F:\Anaconda3\Library\bin;F:\Anaconda3\Scripts;F:\Anaconda3\bin;
                          F:\Anaconda3\condabin;C:\Program Files (x86)\Common Files\Oracle\Java\
                          javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files\AdoptOpe
                          nJDK\jdk-13.0.1.9-hotspot\bin;E:\Python3.7.2;D:\c++\Microsoft Visual
                          Studio\Common\MSDev98\Bin;C:\Program Files\dotnet;E:\Program Files\Jav
                          a\jdk1.8.0_131\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\
                          Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\Op
                          enSSH;E:\MATLAB\R2018a\runtime\win64;E:\MATLAB\R2018a\bin;E:\JDK蓝桥\jdk
                          1.6.0_45\bin;E;\JDK蓝桥\jdk1.6.0_45\jre\bin;%;AVA_HOME%\bin;E:\Program
                          Files\Java\jdk1.8.0_131\bin;E:\Program
                          Files\Java\jdk1.8.0_131\jre\bin;E:\SPSS\JRE\bin;F:\LINGO12;E:\Program
                          Files\Java\jdk1.8.0_131\bin;C:\Program Files (x86)\Microsoft SQL
                          Server\130\Tools\Binn;C:\Program Files\Microsoft SQL
                          Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL
                          Server\130\DTS\Binn;C:\Program Files\Microsoft SQL
                          Server\130\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client
                          SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\15
                          0\DTS\Binn;F:\masm32\bin;E:\Python3.7.2\Scripts;F:\SDK\platform-tools;
                          F:\SDK\tools;F:\nodejs;C:\ProgramData\chocolatey\bin;D:\LINGO64_17;E:\
                          Scripts;E:\;C:\Users\KI\AppData\Local\Microsoft\WindowsApps;C:\Users\K
                          I\AppData\Local\atom\bin;E:\Python3.7.2;E:\Program Files\PyCharm 2019.
                          2\bin;.;C:\Users\KI\AppData\Local\Microsoft\WindowsApps;F:\;E:\Program
                          Files\Java\jdk1.8.0_131\bin;E:\Program
                          Files\Java\jdk1.8.0_131\jre\bin;E:\Microsoft VS Code\bin;F:\Anaconda3\
                          Scripts;E:\Python3.7.2\Scripts;C:\Users\KI\AppData\Roaming\npm;D:\Inte
                          lliJ IDEA Community Edition 2020.1.3\bin;.
             PSMODULEPATH=D:\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerSh
                          ell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Prog
                          ram Files (x86)\Microsoft SQL Server\130\Tools\PowerShell\Modules\
       REQUESTS_CA_BUNDLE=<not set>
            SSL_CERT_FILE=<not set>

     active environment : base
    active env location : F:\Anaconda3
            shell level : 1
       user config file : C:\Users\KI\.condarc
 populated config files : C:\Users\KI\.condarc
          conda version : 4.8.4
    conda-build version : 3.18.11
         python version : 3.7.7.final.0
       virtual packages : __cuda=10.2
       base environment : F:\Anaconda3  (writable)
           channel URLs : https://repo.continuum.io/pkgs/main/win-64
                          https://repo.continuum.io/pkgs/main/noarch
                          https://repo.continuum.io/pkgs/free/win-64
                          https://repo.continuum.io/pkgs/free/noarch
                          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:\Anaconda3\pkgs
                          C:\Users\KI\.conda\pkgs
                          C:\Users\KI\AppData\Local\conda\conda\pkgs
       envs directories : F:\Anaconda3\envs
                          C:\Users\KI\.conda\envs
                          C:\Users\KI\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.8.4 requests/2.23.0 CPython/3.7.7 Windows/10 Windows/10.0.18362
          administrator : False
             netrc file : None
           offline mode : False


An unexpected error has occurred. Conda has prepared the above report.

Upload did not complete.

解决办法:

代码语言:javascript
复制
pip install six

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/152585.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云数据库 SQL Server
腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档