Can't create environment.yml (Windows 10 - Anaconda)
See original GitHub issueTried running DeOldify on the latest Winx64 version of Anaconda. However, the environment.yml creation always fails with numerous conflicts concerning incompatible packages. I tried downgrading conda and various other workarounds I found via google. Any ideas as to what might be causing the issue?
Solving environment:
Found conflicts! Looking for incompatible packages.
This can take several minutes. Press CTRL-C to abort.
Examining conflict for fastai jupyterlab: 80%|████████████████████████████████▊ | 8/10 [00:05<00:01, 1.38it/s]|failed | -
>>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\exceptions.py", line 1079, in __call__
return func(*args, **kwargs)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda_env\cli\main.py", line 80, in do_call
exit_code = getattr(module, func_name)(args, parser)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda_env\cli\main_create.py", line 111, in execute
result[installer_type] = installer.install(prefix, pkg_specs, args, env)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda_env\installers\conda.py", line 32, in install
prune=getattr(args, 'prune', False), update_modifier=UpdateModifier.FREEZE_INSTALLED)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\core\solve.py", line 117, in solve_for_transaction
should_retry_solve)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\core\solve.py", line 158, in solve_for_diff
force_remove, should_retry_solve)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\core\solve.py", line 281, in solve_final_state
ssc = self._run_sat(ssc)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\core\solve.py", line 808, in _run_sat
should_retry_solve=ssc.should_retry_solve
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\common\io.py", line 88, in decorated
return f(*args, **kwds)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\resolve.py", line 1318, in solve
self.find_conflicts(specs, specs_to_add, history_specs)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\resolve.py", line 347, in find_conflicts
bad_deps = self.build_conflict_map(specs, specs_to_add, history_specs)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\resolve.py", line 507, in build_conflict_map
root, search_node, dep_graph, num_occurances)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\resolve.py", line 369, in breadth_first_search_for_dep_graph
last_spec = MatchSpec.union((path[-1], target_paths[-1][-1]))[0]
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\models\match_spec.py", line 481, in union
return cls.merge(match_specs, union=True)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\models\match_spec.py", line 475, in merge
reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\models\match_spec.py", line 475, in <lambda>
reduce(lambda x, y: x._merge(y, union), group) if len(group) > 1 else group[0]
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\models\match_spec.py", line 502, in _merge
final = this_component.union(that_component)
File "C:\Users\petem\Anaconda3\lib\site-packages\conda\models\match_spec.py", line 764, in union
return '|'.join(options)
TypeError: sequence item 0: expected str instance, Channel found
$ C:\Users\petem\Anaconda3\Scripts\conda-env-script.py create -f environment.yml
environment variables:
CIO_TEST=<not set>
CONDA_AUTO_UPDATE_CONDA=false
CONDA_DEFAULT_ENV=base
CONDA_EXE=C:\Users\petem\Anaconda3\condabin..\Scripts\conda.exe
CONDA_EXES=“C:\Users\petem\Anaconda3\condabin..\Scripts\conda.exe”
CONDA_PREFIX=C:\Users\petem\Anaconda3
CONDA_PROMPT_MODIFIER=(base)
CONDA_PYTHON_EXE=C:\Users\petem\Anaconda3\python.exe
CONDA_ROOT=C:\Users\petem\Anaconda3
CONDA_SHLVL=1
HOMEPATH=\Users\petem
PATH=C:\Users\petem\Anaconda3;C:\Users\petem\Anaconda3\Library\mingw-w64\bi
n;C:\Users\petem\Anaconda3\Library\usr\bin;C:\Users\petem\Anaconda3\Li
brary\bin;C:\Users\petem\Anaconda3\Scripts;C:\Users\petem\Anaconda3\bi
n;C:\Users\petem\Anaconda3;C:\Users\petem\Anaconda3\Library\mingw-w64
bin;C:\Users\petem\Anaconda3\Library\usr\bin;C:\Users\petem\Anaconda3
Library\bin;C:\Users\petem\Anaconda3\Scripts;C:\Users\petem\Anaconda3
bin;C:\Users\petem\Anaconda3\condabin;C:\Windows\system32;C:\Windows;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
NvDLISR;C:\Program
Files\Git\cmd;C:\Users\petem\AppData\Local\Microsoft\WindowsApps
PSMODULEPATH=C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\Windows
PowerShell\v1.0\Modules
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : base
active env location : C:\Users\petem\Anaconda3
shell level : 1
user config file : C:\Users\petem\.condarc
populated config files : C:\Users\petem.condarc conda version : 4.8.2 conda-build version : 3.18.11 python version : 3.7.6.final.0 virtual packages : __cuda=10.1 base environment : C:\Users\petem\Anaconda3 (writable) channel URLs : https://repo.anaconda.com/pkgs/main/win-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/free/win-64 https://repo.anaconda.com/pkgs/free/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:\Users\petem\Anaconda3\pkgs C:\Users\petem.conda\pkgs C:\Users\petem\AppData\Local\conda\conda\pkgs envs directories : C:\Users\petem\Anaconda3\envs C:\Users\petem.conda\envs C:\Users\petem\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
An unexpected error has occurred. Conda has prepared the above report.
Upload successful.
(base) C:\Users\petem\pythonstuff\DeOldify>
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (4 by maintainers)

Top Related StackOverflow Question
Ok so this is how I got it running on Windows 10 Step by step: Should note that I didnt fully got it working because Im not running CUDA graphics card, although I got the application up and running and am currently seeing if theres an option to run on CPU instead.
Download Anaconda from here: https://www.anaconda.com/distribution/#download-section. I got it running with Anaconda version (4.7.12) with python version 3.7 installer. During the installation process, you will be presented with two checkboxes. Choose the “recomended one” (the bottom one).
Download WGet from here: http://gnuwin32.sourceforge.net/packages/wget.htm (I went for the
Complete package, except sourcesone or with md5Sumb4679ac6f7757b35435ec711c6c8d912)Add PATH Variables to Windows (If you are unsure what Im referring to, just google how to add system path variables to windows) This step is ofc dependant on where you installed your software. In my case it looked like this:
open either CMD / powershell / git bash, in a folder where you would like to download deOldify and write the following:
git clone https://github.com/jantic/DeOldify.git DeOldify(If you are unsure what GIT is, download git bash from here: https://git-scm.com/downloads).now write
cd DeOldifyin cmd.Open environment.yml file inside deOldify folder. change its content to the following:
Go back to cmd / gitBash or whatever, and write the following:
conda env create -f environment.yml(this takes a long time), and although after a while it looks like nothing is happening, wait some more. it should say when its finished.when previous step is done, write the following in cmd:
conda activate deoldifyIf this step provides with an error like Git isnt inited or similar, open separate cmd window and open in same folder (deOldify folder). Depending on which editor you open, write the following:conda init cmd(if you opened cmd)conda init bashfor Git bash,conda init powershelletc. restart all cmds.open new cmd and write
jupyter labthis step should take a while and when done should open a webApp running on port localhost port 8888.Open separate cmd and write the following:
wget https://www.dropbox.com/s/mwjep3vyqk5mkjc/ColorizeStable_gen.pth?dl=0 -O ./models/ColorizeStable_gen.pth --no-check-certificate(This will only work given we provided theC:\Program Files (x86)\GnuWin32\binto windows PATH) (Should note that I created the foldermodelsinside the deOldify folder beforehand and unchecked the attribute read-only, although unsure if you need to do that yourself)Enter localhost on port 8888 (it should open automatically) and open eg:
imagecolorizer.ipynband go through the steps.For me this is where it ended because Im not running CUDA although if you have nvidia card this shouldnt be an issue.
Yes that was the link. Thank you very much. Greatly appreciated. Have a nice day.