创建虚拟环境输入下面命令后结果显示为true,但是conda info --envs未显示创建的虚拟环境
(base) C:\Windows\System32>conda create -n 3.11 python=3.11
Solving environment: failed
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
`$ D:\Anaconda3-5.2.0\Scripts\conda create -n 3.11 python=3.11`
environment variables:
CIO_TEST=<not set>
CONDA_DEFAULT_ENV=base
CONDA_EXE=D:\Anaconda3-5.2.0\Scripts\conda.exe
CONDA_PREFIX=D:\Anaconda3-5.2.0
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=D:\Anaconda3-5.2.0\python.exe
CONDA_ROOT=D:\Anaconda3-5.2.0
CONDA_SHLVL=1
HOMEPATH=\Users\_
PATH=D:\Anaconda3-5.2.0;D:\Anaconda3-5.2.0\Library\mingw-w64\bin;D:\Anacond
a3-5.2.0\Library\usr\bin;D:\Anaconda3-5.2.0\Library\bin;D:\Anaconda3-5
.2.0\Scripts;D:\Anaconda3-5.2.0\bin;D:\Anaconda3-5.2.0;D:\Anaconda3-5.
2.0\Library\mingw-w64\bin;D:\Anaconda3-5.2.0\Library\usr\bin;D:\Anacon
da3-5.2.0\Library\bin;D:\Anaconda3-5.2.0\Scripts;C:\Program Files
(x86)\Common Files\Intel\Shared
Libraries\redist\intel64_win\compiler;C:\Program
Files\Java\jdk1.8.0_321\bin;C:\Program Files (x86)\VMware\VMware Works
tation\bin\;D:\python\Scripts\;D:\python\;C:\Windows\system32;C:\Windo
ws;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0
\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\NVIDIA
Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA Nv
DLISR;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDO
WS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;D:\Xs
hell\Xshell 7\;D:\Xshell\Xftp
7\;C:\Users\_\AppData\Local\Microsoft\WindowsApps;D:\pycharm\PyCharm
2021.2\bin
PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\Windows
PowerShell\v1.0\Modules
PYTHONIOENCODING=936
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
VBOX_MSI_INSTALL_PATH=D:\ENSP\VirtualBox\
active environment : base
active env location : D:\Anaconda3-5.2.0
shell level : 1
user config file : C:\Users\_\.condarc
populated config files : C:\Users\_\.condarc
conda version : 4.5.4
conda-build version : 3.10.5
python version : 3.6.5.final.0
base environment : D:\Anaconda3-5.2.0 (writable)
channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/win-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r/noarch
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/win-64
https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2/noarch
package cache : D:\Anaconda3-5.2.0\pkgs
C:\Users\_\AppData\Local\conda\conda\pkgs
envs directories : D:\Anaconda3-5.2.0\envs
C:\Users\_\AppData\Local\conda\conda\envs
C:\Users\_\.conda\envs
platform : win-64
user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Windows/10 Windows/10.0.22621
administrator : True
netrc file : None
offline mode : False
V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V V
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/win-64/repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
SSLError(MaxRetryError('HTTPSConnectionPool(host=\'mirrors.tuna.tsinghua.edu.cn\', port=443): Max retries exceeded with url: /anaconda/pkgs/main/win-64/repodata.json (Caused by SSLError(SSLError("bad handshake: Error([(\'SSL routines\', \'ssl3_get_server_certificate\', \'certificate verify failed\')],)",),))',),)
A reportable application error has occurred. Conda has prepared the above report.
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
(base) C:\Windows\System32>conda info --envs
# conda environments:
#
base * D:\Anaconda3-5.2.0
使用conda activate成功调用新环境,
其中envs对应默认存储环境的文件夹,而pkgs则对应默认存储包的文件夹。
配置这两个路径后,conda可以从其他用户的环境下直接调用对应的包和环境,也就是可以直接使用其他用户的环境了。
以下答案由GPT-3.5大模型与博主波罗歌共同编写:
根据报错提示看起来是网络连接问题,可能是无法连接到清华源服务器。建议尝试以下解决方案:
可以通过以下命令更改conda源:
conda config --remove-key channels
conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda
请确保您的计算机已连接到互联网,并且防火墙或安全软件没有阻止conda连接网络。您可以尝试通过使用浏览器访问其他网站来检查是否可以成功连接网络。
如果以上解决方案无法解决问题,请尝试再次执行创建虚拟环境的命令:
conda create -n 3.11 python=3.11
您可以查看conda的日志文件(位于C:/Users/%USERNAME%/Anaconda3/conda-meta/history)以获取更多详细信息。
希望这些解决方案能够帮助您解决问题。
如果我的回答解决了您的问题,请采纳!
conda create -n py373 python=3.7.4
命名不要以数字开头,不要用那么新的版本,三方包依赖跟不上
引用chatGPT作答,从错误报告来看,你的虚拟环境创建失败了。其中,Solving environment: failed的错误信息意味着环境求解器无法解决包的依赖关系。这可能是由于包的版本冲突或包索引的问题引起的。以下是一些解决问题的步骤:
1.检查是否可以访问软件源。你可以尝试更改软件源以查看是否可以解决问题。可以尝试清除conda的缓存(conda clean -all)并重新运行命令。
2.你可以尝试添加--debug标志并重新运行conda create命令,以便更详细地了解导致环境创建失败的原因。根据错误信息,你可能需要修改或删除某些包或库,或尝试使用其他版本的软件包。
3.如果上述步骤仍然无法解决问题,你可以尝试使用其他虚拟环境管理器,例如venv或virtualenv。
在创建虚拟环境之前,建议更新conda和conda环境,以确保你使用的是最新版本的软件包管理器和依赖关系解决器。你可以使用以下命令更新:
conda update conda
conda update --all
如果你仍然无法解决问题,请提供更多信息,例如conda create --debug输出,并说明你正在尝试安装的软件包以及你的操作系统和Python版本等信息。