question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't create environment.yml (Windows 10 - Anaconda)

See original GitHub issue

Tried 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:closed
  • Created 4 years ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
oyvigricommented, Feb 28, 2020

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 sources one or with md5Sum b4679ac6f7757b35435ec711c6c8d912)

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:

C:\Users\XXX\AppData\Local\Continuum\anaconda3
C:\Users\XXX\AppData\Local\Continuum\anaconda3\Scripts
C:\Users\XXX\AppData\Local\Continuum\anaconda3\Library\bin
C:\Program Files (x86)\GnuWin32\bin
  1. 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 DeOldify in cmd.

Open environment.yml file inside deOldify folder. change its content to the following:

name: deoldify
channels:
- fastai
- conda-forge
- defaults
- pytorch
dependencies:
- python>=3.7.3
- fastai=1.0.51
- pytorch=1.0.1
- ffmpeg=4.1.1
- tensorboardX=1.6
- youtube-dl>=2019.4.17
- jupyterlab
- pillow=6.2.1
- pip:
  - ffmpeg-python==0.1.17
  - opencv-python>=3.3.0.10
  - wandb

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 deoldify If 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 bash for Git bash, conda init powershell etc. restart all cmds.

open new cmd and write jupyter lab this 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 the C:\Program Files (x86)\GnuWin32\bin to windows PATH) (Should note that I created the folder models inside 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.ipynb and 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.

1reaction
oyvigricommented, May 16, 2020

Yes that was the link. Thank you very much. Greatly appreciated. Have a nice day.

Read more comments on GitHub >

github_iconTop Results From Across the Web

conda fails to create environment from yml - Stack Overflow
The simplest solution to this is to omit the build info from the environment definition export. There can still be issues if some...
Read more >
Set up an anaconda environment from ... - YouTube
This demonstrates setting up an anaconda environment from an environment. yml file on Windows. It is for our Data Analysis Workflows course, ...
Read more >
Managing environments - Conda
With conda, you can create, export, list, remove, and update environments that have different versions of Python and/or packages installed in them.
Read more >
Setting Up a Conda Environment in Less Than 5 Minutes
Step 1: On Windows open up a Anaconda Prompt, on Linux and MacOS open up a Terminal and go to that directory which...
Read more >
Sharing Environments – Introduction to Conda for (Data ...
Create an environment from a YAML file that can be read by Windows, Mac OS, or Linux. ... and will throw an error...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found