Forum rules
Read the FAQs and search the forum before posting a new topic.
Please mark any answers that fixed your problems so others can find the solutions.
-
binarybits
- Posts: 1
- Joined: Tue Dec 03, 2019 6:26 pm
Error Creating Conda Virtual Environment
Hi,
I’m trying to install FaceSwap on Windows and I get the following errors:
CondaEnvironmentNotFoundError: Could not find environment: base .
Creating Conda virtual environment…
[Stuff about creating the environment]
CommandNotFoundError: ‘deactivate’
Error creating Conda virtual environment.
Install aborted.
Can anyone suggest what might be wrong here? I’m on Windows 10. I tried installing AnaConda but it said the package was already installed.
Thanks.
-Tim
-
fabiomarques297
- Posts: 1
- Joined: Sun Jun 14, 2020 5:14 pm
Error Creating Conda Virtual Environment
Post
by fabiomarques297 » Sun Jun 14, 2020 5:19 pm
Im geting this error when i’m trying to instal the faceswap
(check) CPU Supports AVX Instructions
(check) CPU Supports SSE4 Instructions
(check) Completed check for installed applications
(check) Setting up for: amd
Downloading Miniconda3…
Installing Miniconda3. This will take a few minutes…
Miniconda3 installed.
Initializing Conda…
Creating Conda Virtual Environment…
Error Creating Conda Virtual Environment
Install Aborted
can anybody help me please
-
Dwellerz
- Posts: 9
- Joined: Tue Aug 04, 2020 11:34 pm
-
Dwellerz
- Posts: 9
- Joined: Tue Aug 04, 2020 11:34 pm
-
torzdf
- Posts: 2221
- Joined: Fri Jul 12, 2019 12:53 am
-
Answers: 142
- Has thanked: 110 times
- Been thanked: 505 times
Re: Error Creating Conda Virtual Environment
Post
by torzdf » Thu Aug 06, 2020 6:57 am
fabiomarques297 wrote: ↑Sun Jun 14, 2020 5:19 pm
Im geting this error when i’m trying to instal the faceswap
(check) CPU Supports AVX Instructions
(check) CPU Supports SSE4 Instructions
(check) Completed check for installed applications
(check) Setting up for: amdDownloading Miniconda3…
Installing Miniconda3. This will take a few minutes…
Miniconda3 installed.
Initializing Conda…
Creating Conda Virtual Environment…
Error Creating Conda Virtual Environment
Install Abortedcan anybody help me please
Follow these instructions, and let us know if you still have an issue:
app.php/faqpage#f1r1
My word is final
-
Grassone
- Posts: 45
- Joined: Sun Apr 19, 2020 7:32 pm
- Has thanked: 6 times
- Been thanked: 2 times
Error Creating Conda virtual environment.
Post
by Grassone » Thu Sep 17, 2020 4:22 pm
Hello:
New PC:
Ryzen 2700x
Ventus GeForce RTX 2700
16G ram
3T hdd
Tried to do ALL the steps listed in app.php/faqpage#f1r1
But no luck:
i am stuck with this error.
NOTE 1
Miniconda seems to be installed fine (it can be successufully uninstalled by WIN 10 app manager)
NOTE 2
I found these exe files:
python.exe
python3.exe
python3.7.exe
in the C:UsersFulvio AMDAppDataLocalMicrosoftWindowsApps directory.
Should I remove them ? Do they hurt ?
PLZ. Help.
-
Grassone
- Posts: 45
- Joined: Sun Apr 19, 2020 7:32 pm
- Has thanked: 6 times
- Been thanked: 2 times
Re: Error Creating Conda virtual environment.
Post
by Grassone » Tue Sep 22, 2020 8:55 pm
Interesting… now i have 2 miniconda3 directories…
one in C:fsminiconda3
the second in C:Usersfulvio AMDminiconda3
Faceswap installer detected the existing miniconda3 installation, but apparently cloned it into the usersfulvio AMDminiconda3 directory….
I’ll let you know how it ends…
-
sccsd
- Posts: 1
- Joined: Thu Apr 15, 2021 4:01 am
An error while installing the Faceswap
Post
by sccsd » Thu Apr 15, 2021 4:10 am
Hello,I m a new handed in this kind of software,so while i am installing the software,an error occured that make me confused,i list all below:
Downloading Miniconda3…..
Installing Miniconda3,This will take a few minutes…
Miniconda3 installed,
Initializing Conda…
Creating Conda Virtual Environment…
Error Creating Conda Virtual Environment
Install Aborted
and though i tried to install Miniconda3 manually,after the installation,i tried again ,but it still didn’t work,shoud i creat the environment myself???But i really don’t know how to deal with it…Thank you!
-
ShrekLuzz
- Posts: 1
- Joined: Sat May 01, 2021 3:27 pm
Re: An error while installing the Faceswap
Post
by ShrekLuzz » Sat May 01, 2021 3:29 pm
sccsd wrote: ↑Thu Apr 15, 2021 4:10 am
Hello,I m a new handed in this kind of software,so while i am installing the software,an error occured that make me confused,i list all below:
Downloading Miniconda3…..
Installing Miniconda3,This will take a few minutes…
Miniconda3 installed,
Initializing Conda…
Creating Conda Virtual Environment…
Error Creating Conda Virtual Environment
Install Abortedand though i tried to install Miniconda3 manually,after the installation,i tried again ,but it still didn’t work,shoud i creat the environment myself???But i really don’t know how to deal with it…Thank you!
I got the same issue , hava you fixed it yet ?
Содержание
- Faceswap Forum
- Error Creating Conda virtual environment.
- Error Creating Conda Virtual Environment
- Re: Install error with Conda
- Error Creating Conda Virtual Environment
- Re: Error Creating Conda Virtual Environment
- Re: Error Creating Conda Virtual Environment
- Re: Error Creating Conda Virtual Environment
- Re: Error Creating Conda Virtual Environment
- Re: Error Creating Conda Virtual Environment
- Error Creating Conda virtual environment.
- Re: Error Creating Conda virtual environment.
- Re: Error Creating Conda virtual environment.
- Error Creating Conda Virtual Environment
- Re: Error Creating Conda virtual environment.
- An error while installing the Faceswap
- Re: Error Creating Conda virtual environment.
- Re: An error while installing the Faceswap
- Re: Error Creating Conda virtual environment.
- ResolvePackageNotFound when creating env from exported environment.yml #7311
- Comments
- Current Behavior
- Steps to Reproduce
- Expected Behavior
- Environment Information
- ResolvePackageNotFound when creating env from exported environment.yml #7311
- Comments
- Current Behavior
- Steps to Reproduce
- Expected Behavior
- Environment Information
Faceswap Forum
The place to discuss Faceswap and Deepfakes
Error Creating Conda virtual environment.
Installing and setting up FaceSwap
Read the FAQs and search the forum before posting a new topic.
Please mark any answers that fixed your problems so others can find the solutions.
Error Creating Conda Virtual Environment
Post by binarybits » Tue Dec 03, 2019 6:32 pm
I’m trying to install FaceSwap on Windows and I get the following errors:
CondaEnvironmentNotFoundError: Could not find environment: base .
Creating Conda virtual environment.
[Stuff about creating the environment]
CommandNotFoundError: ‘deactivate’
Error creating Conda virtual environment.
Install aborted.
Can anyone suggest what might be wrong here? I’m on Windows 10. I tried installing AnaConda but it said the package was already installed.
Re: Install error with Conda
Post by torzdf » Tue Dec 03, 2019 8:37 pm
I’ll look into this to make sure the command hasn’t been deprecated
My word is final
Error Creating Conda Virtual Environment
Post by fabiomarques297 » Sun Jun 14, 2020 5:19 pm
Im geting this error when i’m trying to instal the faceswap
(check) CPU Supports AVX Instructions
(check) CPU Supports SSE4 Instructions
(check) Completed check for installed applications
(check) Setting up for: amd
Downloading Miniconda3.
Installing Miniconda3. This will take a few minutes.
Miniconda3 installed.
Initializing Conda.
Creating Conda Virtual Environment.
Error Creating Conda Virtual Environment
Install Aborted
can anybody help me please
Re: Error Creating Conda Virtual Environment
Post by torzdf » Mon Jun 15, 2020 9:54 am
Do you have an internet connection?
Most likely, the installer failed to download MiniConda.
My word is final
Re: Error Creating Conda Virtual Environment
Post by Dwellerz » Tue Aug 04, 2020 11:38 pm
how do you fix this?
Re: Error Creating Conda Virtual Environment
Post by torzdf » Wed Aug 05, 2020 9:48 am
You can try running the Faceswap installer again, or you can install miniconda yourself, manually, and then run the Faceswap installer again
My word is final
Re: Error Creating Conda Virtual Environment
Post by Dwellerz » Wed Aug 05, 2020 7:26 pm
it diddnt work
Re: Error Creating Conda Virtual Environment
Post by torzdf » Thu Aug 06, 2020 6:57 am
Im geting this error when i’m trying to instal the faceswap
(check) CPU Supports AVX Instructions
(check) CPU Supports SSE4 Instructions
(check) Completed check for installed applications
(check) Setting up for: amd
Downloading Miniconda3.
Installing Miniconda3. This will take a few minutes.
Miniconda3 installed.
Initializing Conda.
Creating Conda Virtual Environment.
Error Creating Conda Virtual Environment
Install Aborted
can anybody help me please
Follow these instructions, and let us know if you still have an issue:
app.php/faqpage#f1r1
My word is final
Error Creating Conda virtual environment.
Post by Grassone » Thu Sep 17, 2020 4:22 pm
Ryzen 2700x
Ventus GeForce RTX 2700
16G ram
3T hdd
Tried to do ALL the steps listed in app.php/faqpage#f1r1
But no luck:
i am stuck with this error.
NOTE 1
Miniconda seems to be installed fine (it can be successufully uninstalled by WIN 10 app manager)
NOTE 2
I found these exe files:
python.exe
python3.exe
python3.7.exe
in the C:UsersFulvio AMDAppDataLocalMicrosoftWindowsApps directory.
Should I remove them ? Do they hurt ?
Re: Error Creating Conda virtual environment.
Post by torzdf » Tue Sep 22, 2020 9:15 am
Try manually installing MiniConda into a location which does not have spaces in the path, then specifying the manual location when installing Faceswap
My word is final
Re: Error Creating Conda virtual environment.
Post by Grassone » Tue Sep 22, 2020 8:55 pm
Interesting. now i have 2 miniconda3 directories.
one in C:fsminiconda3
the second in C:Usersfulvio AMDminiconda3
Faceswap installer detected the existing miniconda3 installation, but apparently cloned it into the usersfulvio AMDminiconda3 directory.
I’ll let you know how it ends.
Error Creating Conda Virtual Environment
Post by Vanch1k » Tue Mar 30, 2021 12:02 pm
Have problem «Error Creating Conda Virtual Environment» during installing. Help please..
Re: Error Creating Conda virtual environment.
Post by torzdf » Wed Mar 31, 2021 10:16 am
Try the solutions proposed in this thread first and report back if you still have issues.
My word is final
An error while installing the Faceswap
Post by sccsd » Thu Apr 15, 2021 4:10 am
Hello,I m a new handed in this kind of software,so while i am installing the software,an error occured that make me confused,i list all below:
Downloading Miniconda3.
Installing Miniconda3,This will take a few minutes.
Miniconda3 installed,
Initializing Conda.
Creating Conda Virtual Environment.
Error Creating Conda Virtual Environment
Install Aborted
and though i tried to install Miniconda3 manually,after the installation,i tried again ,but it still didn’t work,shoud i creat the environment myself. But i really don’t know how to deal with it. Thank you!
Re: Error Creating Conda virtual environment.
Post by torzdf » Thu Apr 15, 2021 11:17 am
My word is final
Re: An error while installing the Faceswap
Post by ShrekLuzz » Sat May 01, 2021 3:29 pm
Hello,I m a new handed in this kind of software,so while i am installing the software,an error occured that make me confused,i list all below:
Downloading Miniconda3.
Installing Miniconda3,This will take a few minutes.
Miniconda3 installed,
Initializing Conda.
Creating Conda Virtual Environment.
Error Creating Conda Virtual Environment
Install Aborted
and though i tried to install Miniconda3 manually,after the installation,i tried again ,but it still didn’t work,shoud i creat the environment myself. But i really don’t know how to deal with it. Thank you!
I got the same issue , hava you fixed it yet ?
Re: Error Creating Conda virtual environment.
Post by torzdf » Sun May 02, 2021 11:19 am
The most common cause of this issue is spaces in your username.
This seems insane, true, but it is an issue with Miniconda, not with Faceswap (ref: https://github.com/conda/conda/issues/8725)
Most times, uninstalling Miniconda/Anaconda and than manually installing from here: https://repo.anaconda.com/miniconda/Min . x86_64.exe to a location which does not have spaces in the folder name fixes the issue.
Just make sure you specify the location of your Miniconda folder when you install faceswap.
Источник
ResolvePackageNotFound when creating env from exported environment.yml #7311
I’m submitting a.
Current Behavior
Running conda env create -f environment.yml , many packages fail from ResolvePackageNotFound.
The environment.yml was exported from a machine where the environment was working fine.
Steps to Reproduce
Expected Behavior
All packages installed correctly
Environment Information
`conda config —show-sources`
nothing for above* `conda list —show-channel-urls`
from original computer: `conda info`
The text was updated successfully, but these errors were encountered:
Can you provide conda info from the machine where the environment.yml file was working?
Also might need the full contents of that environment.yml file.
Appended above, thanks!
Has a solution to this issue been found? I am facing a very similar looking problem. thanks!
This problem can happen if the environment was exported on a different platform than the target machine. For example, in the output above, the environment.yaml has the package: pyyaml==3.12=py27ha7932d0_1 , and this is available only on osx-64, but the OP is trying to create the environment on a linux machine, and it won’t find the package in the linux-64 subdir. There is nothing wrong in Conda here. Please explore the —no-builds option to conda env export , which would relax the constraint on the package build.
Closing as a non-issue. Feel free to re-open if you feel otherwise.
I mentioned this in #7836, but I’m still running into this problem now, and I’m wondering if this is a better place to have the discussion. Unfortunately the environment I’m looking at wasn’t created by me, so I can’t necessarily use the —no-builds option. I could (and likely will) go through and manually delete the build info off the end of each entry in the environment file, but that seems like it essentially destroys the elegance of the export/creation process. Would it be at all feasible to make the —no-builds option default, and maybe changing that flag to —include-builds or something similar? After some Google searching initially, I found that this seems to be a pretty common problem with people switching between OSs. I don’t know all the intricacies of conda (or have any enterprise dev experience) so maybe the build numbers are more essential, but in my personal developments I’d started resorting back to just writing the yml’s by hand before I learned about the —no-builds .
EDIT: I guess another option could be to include a —ignore-builds option when creating an environment from a file.
Closing as a non-issue. Feel free to re-open if you feel otherwise.
I want to make sure I understand this topic & its consequences: a conda user should thus always include the —no-builds option in a given project’s README or documentation, unless one can be absolutely sure that any & all other project contributors are using the same native OS environment as the original creator of the environment file, right @nehaljwani ?
If so, shouldn’t the —no-builds option be activated by default @conda-bot?
If this is true, then it severely undermines the very purpose of a virtual environment in the first place. I myself am running code for my employer on a MacOS laptop while working with a new individual who is unable to re-create the same conda virtual environment on a Windows machine, even within a «live-boot» Linux environment.
If I must specify to conda : ‘do not consider the native machine’s OS, merely install the packages listed’, then A) why bother with a reqs/env file, given it doesn’t fully express the necessary requirements or environment, and B) why necessitate an input file in the first place if doesn’t require the very minimum of information (i.e. the OS itself)?
Adding to @TCAllen07 comment, even the —no-builds option doesn’t work as it includes the OS specific dependencies in the .yml file.
I tried using —no-builds —from-history and still it added windows specific packages, for example:
running conda env export —no-builds —from-history > environment.yaml
resulted in the following packes in the yml :
Unless there is something that i don’t understand, to me conda is an unusable venv manager.
The whole concept of using yml files is to simplify environment installation on other computers. Why does the conda env export command generate a file that only works on the originating host?
Источник
ResolvePackageNotFound when creating env from exported environment.yml #7311
I’m submitting a.
Current Behavior
Running conda env create -f environment.yml , many packages fail from ResolvePackageNotFound.
The environment.yml was exported from a machine where the environment was working fine.
Steps to Reproduce
Expected Behavior
All packages installed correctly
Environment Information
`conda config —show-sources`
nothing for above* `conda list —show-channel-urls`
from original computer: `conda info`
The text was updated successfully, but these errors were encountered:
Can you provide conda info from the machine where the environment.yml file was working?
Also might need the full contents of that environment.yml file.
Appended above, thanks!
Has a solution to this issue been found? I am facing a very similar looking problem. thanks!
This problem can happen if the environment was exported on a different platform than the target machine. For example, in the output above, the environment.yaml has the package: pyyaml==3.12=py27ha7932d0_1 , and this is available only on osx-64, but the OP is trying to create the environment on a linux machine, and it won’t find the package in the linux-64 subdir. There is nothing wrong in Conda here. Please explore the —no-builds option to conda env export , which would relax the constraint on the package build.
Closing as a non-issue. Feel free to re-open if you feel otherwise.
I mentioned this in #7836, but I’m still running into this problem now, and I’m wondering if this is a better place to have the discussion. Unfortunately the environment I’m looking at wasn’t created by me, so I can’t necessarily use the —no-builds option. I could (and likely will) go through and manually delete the build info off the end of each entry in the environment file, but that seems like it essentially destroys the elegance of the export/creation process. Would it be at all feasible to make the —no-builds option default, and maybe changing that flag to —include-builds or something similar? After some Google searching initially, I found that this seems to be a pretty common problem with people switching between OSs. I don’t know all the intricacies of conda (or have any enterprise dev experience) so maybe the build numbers are more essential, but in my personal developments I’d started resorting back to just writing the yml’s by hand before I learned about the —no-builds .
EDIT: I guess another option could be to include a —ignore-builds option when creating an environment from a file.
Closing as a non-issue. Feel free to re-open if you feel otherwise.
I want to make sure I understand this topic & its consequences: a conda user should thus always include the —no-builds option in a given project’s README or documentation, unless one can be absolutely sure that any & all other project contributors are using the same native OS environment as the original creator of the environment file, right @nehaljwani ?
If so, shouldn’t the —no-builds option be activated by default @conda-bot?
If this is true, then it severely undermines the very purpose of a virtual environment in the first place. I myself am running code for my employer on a MacOS laptop while working with a new individual who is unable to re-create the same conda virtual environment on a Windows machine, even within a «live-boot» Linux environment.
If I must specify to conda : ‘do not consider the native machine’s OS, merely install the packages listed’, then A) why bother with a reqs/env file, given it doesn’t fully express the necessary requirements or environment, and B) why necessitate an input file in the first place if doesn’t require the very minimum of information (i.e. the OS itself)?
Adding to @TCAllen07 comment, even the —no-builds option doesn’t work as it includes the OS specific dependencies in the .yml file.
I tried using —no-builds —from-history and still it added windows specific packages, for example:
running conda env export —no-builds —from-history > environment.yaml
resulted in the following packes in the yml :
Unless there is something that i don’t understand, to me conda is an unusable venv manager.
The whole concept of using yml files is to simplify environment installation on other computers. Why does the conda env export command generate a file that only works on the originating host?
Источник
WARNING conda.exceptions:print_unexpected_error_report(1216):
KeyError(‘pkgs_dirs’) Traceback (most recent call last): File
«C:ProgramDataAnaconda3libsite-packagescondaexceptions.py», line
1082, in call
return func(*args, **kwargs) File «C:ProgramDataAnaconda3libsite-packagescondaclimain.py», line
87, in _main
exit_code = do_call(args, p) File «C:ProgramDataAnaconda3libsite-packagescondacliconda_argparse.py»,
line 84, in do_call
return getattr(module, func_name)(args, parser) File «C:ProgramDataAnaconda3libsite-packagescondaclimain_create.py»,
line 21, in execute
if is_conda_environment(context.target_prefix): File «C:ProgramDataAnaconda3libsite-packagescondabasecontext.py»,
line 591, in target_prefix
return determine_target_prefix(self) File «C:ProgramDataAnaconda3libsite-packagescondabasecontext.py»,
line 1738, in determine_target_prefix
return locate_prefix_by_name(prefix_name) File «C:ProgramDataAnaconda3libsite-packagescondabasecontext.py»,
line 1681, in locate_prefix_by_name
envs_dirs = context.envs_dirs File «C:ProgramDataAnaconda3libsite-packagescondabasecontext.py»,
line 517, in envs_dirs
return mockable_context_envs_dirs(self.root_writable, self.root_prefix, self._envs_dirs) File
«C:ProgramDataAnaconda3libsite-packagescondabasecontext.py»,
line 91, in mockable_context_envs_dirs
fixed_dirs += join(user_data_dir(APP_NAME, APP_NAME), ‘envs’), File
«C:ProgramDataAnaconda3libsite-packagesconda_vendorappdirs.py»,
line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname) File
«C:ProgramDataAnaconda3libsite-packagesconda_vendorappdirs.py»,
line 284, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell ImportError: DLL load failed while importing shell: The specified procedure could not be
found.
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File
«C:ProgramDataAnaconda3libsite-packagescondaexceptions.py», line
1214, in print_unexpected_error_report
message_builder.append(get_main_info_str(error_report[‘conda_info’]))
File
«C:ProgramDataAnaconda3libsite-packagescondaclimain_info.py»,
line 237, in get_main_info_str
info_dict[‘_’ + key] = (‘n’ + 26 * ‘ ‘).join(info_dict[key]) KeyError: ‘pkgs_dirs’
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:ProgramDataAnaconda3libsite-packagescondaexceptions.py", line
1082, in call
return func(*args, **kwargs)
File «C:ProgramDataAnaconda3libsite-packagescondaclimain.py», line
87, in _main
exit_code = do_call(args, p)
File «C:ProgramDataAnaconda3libsite-packagescondacliconda_argparse.py»,
line 84, in do_call
return getattr(module, func_name)(args, parser)
File «C:ProgramDataAnaconda3libsite-packagescondaclimain_create.py»,
line 21, in execute
if is_conda_environment(context.target_prefix):
File «C:ProgramDataAnaconda3libsite-packagescondabasecontext.py»,
line 591, in target_prefix
return determine_target_prefix(self)
File «C:ProgramDataAnaconda3libsite-packagescondabasecontext.py»,
line 1738, in determine_target_prefix
return locate_prefix_by_name(prefix_name)
File «C:ProgramDataAnaconda3libsite-packagescondabasecontext.py»,
line 1681, in locate_prefix_by_name
envs_dirs = context.envs_dirs
File «C:ProgramDataAnaconda3libsite-packagescondabasecontext.py»,
line 517, in envs_dirs
return mockable_context_envs_dirs(self.root_writable, self.root_prefix, self._envs_dirs)
File «C:ProgramDataAnaconda3libsite-packagescondabasecontext.py»,
line 91, in mockable_context_envs_dirs
fixed_dirs += join(user_data_dir(APP_NAME, APP_NAME), ‘envs’),
File «C:ProgramDataAnaconda3libsite-packagesconda_vendorappdirs.py»,
line 67, in user_data_dir
path = os.path.join(_get_win_folder(const), appauthor, appname)
File «C:ProgramDataAnaconda3libsite-packagesconda_vendorappdirs.py»,
line 284, in _get_win_folder_with_pywin32
from win32com.shell import shellcon, shell
ImportError: DLL load failed while importing shell: The specified procedure could not be found.
$ C:ProgramDataAnaconda3Scriptsconda-script.py create --name tf python=3.9
environment variables: conda info could not be constructed.
KeyError(‘pkgs_dirs’)
An unexpected 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
I keep getting this error. I tried conda info and it gives this error as well. Tried conda config --show-sources and it doesn’t return anything.
ERROR requests.packages.urllib3.connection:_match_hostname(317): Certificate did not match expected hostname: conda.anaconda.org. Certificate: {‘caIssuers’: (‘http://crt.comodoca.com/COMODORSADomainValidationSecureServerCA.crt’,), ‘version’: 3, ‘notAfter’: ‘Feb 17 23:59:59 2020 GMT’, ‘serialNumber’: ’11AFCC443E29F0A31FC718D9E96E7473′, ‘crlDistributionPoints’: (‘http://crl.comodoca.com/COMODORSADomainValidationSecureServerCA.crl’,), ‘subjectAltName’: ((‘DNS’, ‘.coxhn.net’), (‘DNS’, ‘coxhn.net’)), ‘notBefore’: ‘Feb 18 00:00:00 2015 GMT’, ‘issuer’: (((‘countryName’, ‘GB’),), ((‘stateOrProvinceName’, ‘Greater Manchester’),), ((‘localityName’, ‘Salford’),), ((‘organizationName’, ‘COMODO CA Limited’),), ((‘commonName’, ‘COMODO RSA Domain Validation Secure Server CA’),)), ‘subject’: (((‘organizationalUnitName’, ‘Domain Control Validated’),), ((‘organizationalUnitName’, ‘COMODO SSL Wildcard’),), ((‘commonName’, ‘.coxhn.net’),)), ‘OCSP’: (‘http://ocsp.comodoca.com’,)}
Could not connect to https://conda.anaconda.org/conda-forge/osx-64/pyasn1-0.1.9-py35_0.tar.bz2
An unexpected error has occurred.
Please consider posting the following information to the
conda GitHub issue tracker at:
https://github.com/conda/conda/issues
Current conda install:
platform : osx-64
conda version : 4.2.9
conda is private : False
conda-env version : 4.2.9
conda-build version : 2.0.2
python version : 3.5.2.final.0
requests version : 2.11.1
root environment : /Users/nahidalam/anaconda (writable)
default environment : /Users/nahidalam/anaconda
envs directories : /Users/nahidalam/anaconda/envs
package cache : /Users/nahidalam/anaconda/pkgs
channel URLs : https://repo.continuum.io/pkgs/free/osx-64/
https://repo.continuum.io/pkgs/free/noarch/
https://repo.continuum.io/pkgs/pro/osx-64/
https://repo.continuum.io/pkgs/pro/noarch/
config file : None
offline mode : False
$ /Users/nahidalam/anaconda/bin/conda-env create -f environment.yml
Traceback (most recent call last):
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 595, in urlopen
chunked=chunked)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 352, in _make_request
self._validate_conn(conn)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 831, in _validate_conn
conn.connect()
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 305, in connect
_match_hostname(cert, self.assert_hostname or hostname)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connection.py", line 313, in _match_hostname
match_hostname(cert, asserted_hostname)
File "/Users/nahidalam/anaconda/lib/python3.5/ssl.py", line 297, in match_hostname
% (hostname, ', '.join(map(repr, dnsnames))))
ssl.CertificateError: hostname 'conda.anaconda.org' doesn't match either of '*.coxhn.net', 'coxhn.net'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/requests/adapters.py", line 423, in send
timeout=timeout
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/requests/packages/urllib3/connectionpool.py", line 621, in urlopen
raise SSLError(e)
requests.packages.urllib3.exceptions.SSLError: hostname 'conda.anaconda.org' doesn't match either of '*.coxhn.net', 'coxhn.net'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda/fetch.py", line 377, in download
resp = session.get(url, stream=True, proxies=session.proxies, timeout=(3.05, 27))
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/requests/sessions.py", line 488, in get
return self.request('GET', url, **kwargs)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/requests/sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/requests/adapters.py", line 497, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: hostname 'conda.anaconda.org' doesn't match either of '*.coxhn.net', 'coxhn.net'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda_env/installers/conda.py", line 32, in install
plan.execute_actions(actions, index, verbose=not args.quiet)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda/plan.py", line 643, in execute_actions
inst.execute_instructions(plan, index, verbose)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda/instructions.py", line 134, in execute_instructions
cmd(state, arg)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda/instructions.py", line 47, in FETCH_CMD
fetch_pkg(state['index'][arg + '.tar.bz2'])
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda/fetch.py", line 336, in fetch_pkg
download(url, path, session=session, md5=info['md5'], urlstxt=True)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda/fetch.py", line 403, in download
raise CondaRuntimeError(msg)
conda.exceptions.CondaRuntimeError: Runtime error: Connection error: hostname 'conda.anaconda.org' doesn't match either of '*.coxhn.net', 'coxhn.net': https://conda.anaconda.org/conda-forge/osx-64/pyasn1-0.1.9-py35_0.tar.bz2
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda/exceptions.py", line 473, in conda_exception_handler
return_value = func(*args, **kwargs)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda_env/cli/main_create.py", line 111, in execute
installer.install(prefix, pkg_specs, args, env)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda_env/installers/conda.py", line 39, in install
raise CondaSystemExit('Exiting', e)
File "/Users/nahidalam/anaconda/lib/python3.5/contextlib.py", line 77, in __exit__
self.gen.throw(type, value, traceback)
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda/cli/common.py", line 573, in json_progress_bars
yield
File "/Users/nahidalam/anaconda/lib/python3.5/site-packages/conda_env/installers/conda.py", line 37, in install
raise CondaRuntimeError('RuntimeError: %s' % e)
conda.exceptions.CondaRuntimeError: Runtime error: RuntimeError: Runtime error: Connection error: hostname 'conda.anaconda.org' doesn't match either of '*.coxhn.net', 'coxhn.net': https://conda.anaconda.org/conda-forge/osx-64/pyasn1-0.1.9-py35_0.tar.bz2
Table of Contents
Hide
- What is Solving environment: failed with initial frozen solve. retrying with flexible solve?
- How to fix Solving environment: failed with initial frozen solve. retrying with flexible solve?
- Solution 1: Create a virtual environment using conda
- Solution 2: Set channel_priority to false
- Solution 3: Upgrade conda to the latest version
- Conclusion
The Solving environment: failed with initial frozen solve. retrying with flexible solve occurs if you try to download any package that already exists and it breaks the anaconda environment.
In this tutorial, we will take a look at what is “Solving environment: failed with initial frozen solve. retrying with flexible solve error” and how to resolve this issue.
If we are working on multiple Python projects, the best way to separate concerns of packages or libraries is by creating virtual environments else you will face the below error while installing packages.
(base) [localhost ~]$ conda --version
conda 4.8.2
(base) [localhost ~]$ conda install -c anaconda requests-kerberos
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
In Python, when you install a package, it might warn that the package already exists, and it will modify the package by upgrading or downgrading to the relevant version.
Some of the packages would be dependent on other packages, and it might do the changes by upgrading or downgrading them.
Hence to effectively manage the dependencies, each project should have its own virtual environment, and inside that, the packages should be installed and maintained to avoid conflicts.
How to fix Solving environment: failed with initial frozen solve. retrying with flexible solve?
There are multiple ways to fix the error. Let us take a look at each of these solutions in detail.
Solution 1: Create a virtual environment using conda
It is recommended and best practice to have virtual environments for each project to effectively manage the dependencies and packages.
Follow the steps to create and activate the virtual environment using conda.
Step 1: Create a virtual environment using conda
conda create --name myenv
Step 2: Activate the virtual environment
conda activate myenv
Once you have activated the virtual environment, you can install packages inside the virtual environment and manage the dependencies.
Solution 2: Set channel_priority to false
Conda channels are the locations where packages are stored. They serve as the base for hosting and managing packages.
Add channel_priority: false to your .condarc file.
OR
Run the equivalent command:
conda config --set channel_priority false
By setting channel_priority , conda then sorts the packages as follows:
- Sorts the package list from highest to lowest version number.
- Sorts tied packages from highest to lowest channel priority.
- Sorts tied packages from the highest to the lowest build number.
Solution 3: Upgrade conda to the latest version
Another alternative is to upgrade the conda to the latest version by running the below command.
conda update --all --yes
Once the update is finished, you should be able to install the packages successfully.
conda install -c spyder-ide spyder-unittest
Conclusion
If we do not maintain the virtual environments while developing Python projects then you will get Solving environment: failed with initial frozen solve. retrying with flexible solve error while installing the packages and managing the dependencies.
We can resolve this issue by creating a separate virtual environments for each projects using conda and installing the packages inside the virtual environment.
Srinivas Ramakrishna is a Solution Architect and has 14+ Years of Experience in the Software Industry. He has published many articles on Medium, Hackernoon, dev.to and solved many problems in StackOverflow. He has core expertise in various technologies such as Microsoft .NET Core, Python, Node.JS, JavaScript, Cloud (Azure), RDBMS (MSSQL), React, Powershell, etc.
Sign Up for Our Newsletters
Subscribe to get notified of the latest articles. We will never spam you. Be a part of our ever-growing community.
By checking this box, you confirm that you have read and are agreeing to our terms of use regarding the storage of the data submitted through this form.
