gpt4 book ai didi

python - 两个conda环境冲突

转载 作者:行者123 更新时间:2023-12-05 06:12:15 30 4
gpt4 key购买 nike

我已经安装了日常使用的anaconda。最近,我安装了一个也支持python的商业软件。该软件将 miniconda 安装在另一个文件夹中,并为自身创建了一个环境。但是当我激活环境并使用 conda 或 'pip' 安装一些包时,发生了错误。例如,conda install scipy导致:

Traceback (most recent call last):
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\common\serialize.py", line 19, in get_yaml
import ruamel_yaml as yaml
ModuleNotFoundError: No module named 'ruamel_yaml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\common\serialize.py", line 22, in get_yaml
import ruamel.yaml as yaml
ModuleNotFoundError: No module named 'ruamel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\exceptions.py", line 1074, in __call__
return func(*args, **kwargs)
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\cli\main.py", line 74, in _main
from ..base.context import context
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\base\context.py", line 28, in <module>
from ..common.configuration import (Configuration, ConfigurationLoadError, MapParameter,
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\common\configuration.py", line 40, in <module>
from .serialize import yaml_load
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\common\serialize.py", line 30, in <module>
yaml = get_yaml()
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\_vendor\auxlib\decorators.py", line 59, in _memoized_func
result = func(*args, **kwargs)
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\common\serialize.py", line 24, in get_yaml
raise ImportError("No yaml library available.\n"
ImportError: No yaml library available.
To proceed, conda install ruamel_yaml

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\common\serialize.py", line 19, in get_yaml
import ruamel_yaml as yaml
ModuleNotFoundError: No module named 'ruamel_yaml'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\common\serialize.py", line 22, in get_yaml
import ruamel.yaml as yaml
ModuleNotFoundError: No module named 'ruamel'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\Scripts\conda-script.py", line 12, in <module>
sys.exit(main())
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\cli\main.py", line 150, in main
return conda_exception_handler(_main, *args, **kwargs)
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\exceptions.py", line 1366, in conda_exception_handler
return_value = exception_handler(func, *args, **kwargs)
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\exceptions.py", line 1077, in __call__
return self.handle_exception(exc_val, exc_tb)
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\exceptions.py", line 1121, in handle_exception
return self.handle_unexpected_exception(exc_val, exc_tb)
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\exceptions.py", line 1132, in handle_unexpected_exception
self.print_unexpected_error_report(error_report)
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\exceptions.py", line 1187, in print_unexpected_error_report
from .base.context import context
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\base\context.py", line 28, in <module>
from ..common.configuration import (Configuration, ConfigurationLoadError, MapParameter,
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\common\configuration.py", line 40, in <module>
from .serialize import yaml_load
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\common\serialize.py", line 30, in <module>
yaml = get_yaml()
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\_vendor\auxlib\decorators.py", line 59, in _memoized_func
result = func(*args, **kwargs)
File "C:\ProgramData\Miniconda3\envs\GMS_VENV_PYTHON\lib\site-packages\conda\common\serialize.py", line 24, in get_yaml
raise ImportError("No yaml library available.\n"
ImportError: No yaml library available.
To proceed, conda install ruamel_yaml

pip install scipy 导致:

Collecting scipy
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1051)'))': /simple/scipy/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1051)'))': /simple/scipy/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1051)'))': /simple/scipy/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1051)'))': /simple/scipy/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1051)'))': /simple/scipy/
Could not fetch URL https://pypi.org/simple/scipy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/scipy/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1051)'))) - skipping
Could not find a version that satisfies the requirement scipy (from versions: )
No matching distribution found for scipy

有谁知道如何解决这个问题?

最佳答案

你应该先安装ruamel.yaml

pip install ruamel.yaml

关于python - 两个conda环境冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63665355/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com