• 全部
  • 互动交流
  • 文章分享

Anaconda 创建虚拟环境失败 问题,请各位赐教

bolv6666 气象局 2020-03-31 10:15:55
请教各位,简单的创建一个虚拟环境,总是报错,不管是默认的镜像,还是更换国内镜像都不行,是哪里的问题呢?
(base) PS C:\Users\WW> conda create -n testAnaconda python=3.7
Collecting package metadata (current_repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
current version: 4.8.2
latest version: 4.8.3

Please update conda by running

$ conda update -n base -c defaults conda
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\science\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 301, in _make_single_record
repodata_record = read_repodata_json(extracted_package_dir)
File "C:\science\Anaconda3\lib\site-packages\conda\gateways\disk\read.py", line 130, in read_repodata_json
with open(join(extracted_package_directory, 'info', 'repodata_record.json')) as fi:
File "C:\science\Anaconda3\lib\site-packages\conda\common\compat.py", line 178, in open
closefd=closefd)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\science\\Anaconda3\\pkgs\\conda-4.8.3-py37_0\\info\\repodata_record.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\science\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 318, in _make_single_record
raw_json_record = read_index_json(extracted_package_dir)
File "C:\science\Anaconda3\lib\site-packages\conda\gateways\disk\read.py", line 116, in read_index_json
with open(join(extracted_package_directory, 'info', 'index.json')) as fi:
File "C:\science\Anaconda3\lib\site-packages\conda\common\compat.py", line 178, in open
closefd=closefd)
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\science\\Anaconda3\\pkgs\\conda-4.8.3-py37_0\\info\\index.json'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\science\Anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "C:\science\Anaconda3\lib\site-packages\conda\cli\main.py", line 84, in _main
exit_code = do_call(args, p)
return getattr(module, func_name)(args, parser)
File "C:\science\Anaconda3\lib\site-packages\conda\cli\main_create.py", line 37, in execute
install(args, parser, 'create')
File "C:\science\Anaconda3\lib\site-packages\conda\cli\install.py", line 317, in install
handle_txn(unlink_link_transaction, prefix, args, newenv)
File "C:\science\Anaconda3\lib\site-packages\conda\cli\install.py", line 333, in handle_txn
unlink_link_transaction.print_transaction_summary()
File "C:\science\Anaconda3\lib\site-packages\conda\core\link.py", line 917, in print_transaction_summary
legacy_action_groups = self._make_legacy_action_groups()
File "C:\science\Anaconda3\lib\site-packages\conda\core\link.py", line 901, in _make_legacy_action_groups
self._pfe.prepare()
File "C:\science\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "C:\science\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 612, in prepare
for prec in self.link_precs)
File "C:\science\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 612, in <genexpr>
for prec in self.link_precs)
File "C:\science\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 503, in make_actions_for_record
), None)
File "C:\science\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 500, in <genexpr>
pcrec for pcrec in concat(PackageCacheData(pkgs_dir).query(pref_or_spec)
File "C:\science\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 501, in <genexpr>
for pkgs_dir in context.pkgs_dirs)
File "C:\science\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 130, in query
return (pcrec for pcrec in itervalues(self._package_cache_records) if pcrec == param)
File "C:\science\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 244, in _package_cache_records
self.load()
File "C:\science\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 96, in load
package_cache_record = self._make_single_record(base_name)
File "C:\science\Anaconda3\lib\site-packages\conda\core\package_cache_data.py", line 340, in _make_single_record
extract_tarball(package_tarball_full_path, extracted_package_dir)
File "C:\science\Anaconda3\lib\site-packages\conda\gateways\disk\create.py", line 219, in extract_tarball
conda_package_handling.api.extract(tarball_full_path, dest_dir=destination_directory)
File "C:\science\Anaconda3\lib\site-packages\conda_package_handling\api.py", line 58, in extract
SUPPORTED_EXTENSIONS[ext].extract(fn, dest_dir, components=components)
File "C:\science\Anaconda3\lib\site-packages\conda_package_handling\conda_fmt.py", line 59, in extract
_extract_component(fn, file_id, component, dest_dir)
File "C:\science\Anaconda3\lib\site-packages\conda_package_handling\conda_fmt.py", line 38, in _extract_component
.format(component_name, fn))
RuntimeError: didn't find info component in C:\science\Anaconda3\pkgs\conda-4.8.3-py37_0.conda

`$ C:\science\Anaconda3\Scripts\conda-script.py create -n testAnaconda python=3.7`

environment variables:
CIO_TEST=<not set>
CONDA_DEFAULT_ENV=base
CONDA_EXE=C:\science\Anaconda3\Scripts\conda.exe
CONDA_PREFIX=C:\science\Anaconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=C:\science\Anaconda3\python.exe
CONDA_ROOT=C:\science\Anaconda3
CONDA_SHLVL=1
HOMEPATH=\Users\
PATH=C:\science\Anaconda3;C:\science\Anaconda3\Library\mingw-w64\bin;C:\sci
ence\Anaconda3\Library\usr\bin;C:\science\Anaconda3\Library\bin;C:\sci
ence\Anaconda3\Scripts;C:\science\Anaconda3\bin;C:\science\Anaconda3;C
:\science\Anaconda3\Library\mingw-w64\bin;C:\science\Anaconda3\Library
\usr\bin;C:\science\Anaconda3\Library\bin;C:\science\Anaconda3\Scripts
;C:\science\Anaconda3\bin;C:\science\Anaconda3\condabin;C:\science\Ana
conda3;C:\science\Anaconda3\Library\mingw-w64\bin;C:\science\Anaconda3
\Library\usr\bin;C:\science\Anaconda3\Library\bin;C:\science\Anaconda3
\Scripts;C:\Program Files (x86)\Intel\iCLS Client;C:\Program
Files\Intel\iCLS Client;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\Syst
em32\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)\Windows Kits\8.0\Windows Performance Toolkit;C:\Program
Files\Microsoft SQL
Server\110\Tools\Binn;C:\WINDOWS\System32\OpenSSH;C:\Program
Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommo
n;C:\science\grads\Contents\Cygwin\Versions\2.0.1.oga.1\i686;C:\scienc
e\python\Scripts;C:\science\python;C:\Users\\AppData\Local\Microsoft
\WindowsApps;.;C:\Users\\AppData\Local\Programs\Microsoft VS
Code\bin
PSMODULEPATH=C:\Users\\Documents\WindowsPowerShell\Modules;C:\Program Files\Windo
wsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Module
s
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>

active environment : base
active env location : C:\science\Anaconda3
shell level : 1
user config file : C:\Users\\.condarc
populated config files : C:\Users\\.condarc
conda version : 4.8.2
conda-build version : 3.18.11
python version : 3.7.6.final.0
virtual packages :
base environment : C:\science\Anaconda3 (writable)
channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/win-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/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 : C:\science\Anaconda3\pkgs
C:\Users\\.conda\pkgs
C:\Users\\AppData\Local\conda\conda\pkgs
envs directories : C:\science\Anaconda3\envs
C:\Users\\.conda\envs
C:\Users\\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.8.2 requests/2.22.0 CPython/3.7.6 Windows/10 Windows/10.0.18362
administrator : False
netrc file : None
offline mode : False
[/code]
...全文
789 点赞 收藏 6
写回复
6 条回复
切换为时间正序
请发表友善的回复…
发表回复

这个问题主要是因为网络的问题,把vpn等代理服务器关掉就好了。

回复 1
@馋学习的身子 牛逼
回复
您最后解决了吗
回复
m0_46649014 2020-10-16
我命令行输入 conda config --set ssl_verify false 之后 conda update --all 也报错 , environment variables: CIO_TEST=<not set> CONDA_ROOT=/home/cheyanlin/miniconda3 MODULEPATH=/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles PATH=/home/cheyanlin/miniconda3/bin:/usr/share/Modules/bin:/usr/local/bin:/ usr/bin:/usr/local/sbin:/usr/sbin REQUESTS_CA_BUNDLE=<not set> SSL_CERT_FILE=<not set> .......
回复
慕飒潇湘 2020-04-01
版本问题,你需要升级一下
回复
放风喽 2020-03-31
A newer version of conda exists
存在较新版本的conda

所以你升级一下试试???

conda update -n base -c defaults conda
回复
相关推荐
发帖
脚本语言
创建于2007-08-27

3.7w+

社区成员

JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
申请成为版主
帖子事件
创建了帖子
2020-03-31 10:15
社区公告

CSDN 脚本语言社区接受专栏投稿(专栏会在顶部创建专属你的栏目),投稿需满足以下要求:

  • 脚本语言技术相关;
  • 文章持续更新,保持活跃;
  • 内容清晰明了,干货为主;
  • 文章排版有序,有条有理。

本社区开通招聘专栏,发布招聘信息请联系版主,发布者需要保证招聘信息真实有效,CSDN 平台和版主不对招聘内容负责!

联系方式:私聊版主、发送邮件、QQ联系等均可: