object_detector_app
object_detector_app copied to clipboard
environment.yml ResolvePackageNotFound
Windows 10 64bit
Using Anaconda API: https://api.anaconda.org
Fetching package metadata .................
ResolvePackageNotFound:
- freetype 2.5.5 2
ResolvePackageNotFound describe all packages not installed yet. That you need to move ResolvePackageNotFound to below pip: sentence looks like:
Best, Thu
Thank you. It worked.
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?
Ubuntu Using Anaconda API: https://api.anaconda.org Solving environment: failed
ResolvePackageNotFound:
- opencv3==3.0.0=py35_0
- tbb==4.3_20141023=0
Though I've placed these two requirements under pip section in .yml file im getting the same error. Can you help me out?
It seems that menpo tbb is for osx-64 only, and jlaura::opencv3=3.0.0 is not available for some reason. By slightly omitting the detail in environment.yml
:
-
tbb==4.3_20141023=0
totbb
-
jlaura::opencv3==3.0.0=py35_0
toopencv3
The initial error was resolved, but I faced another error like this:
UnsatisfiableError: The following specifications were found to be in conflict:
- libtiff==4.0.6=3 -> jpeg=9
- qt==5.6.2=2 -> jpeg=8
There will be more elaborate ways to handle this error, but I took a simple detour like this:
-
libtiff==4.0.6=3
tolibtiff
-
qt==5.6.2=2
toqt
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?
This is still haunting me.
@Aki1987 that worked!! thank you.
ResolvePackageNotFound describe all packages not installed yet. That you need to move ResolvePackageNotFound to below pip: sentence looks like:
Best, Thu
I had the same problem. It is frustrating, because precisely the point of anaconda is to manage this automatically.
I didn't have any pip packages in my environment.yml, all were packages installed by conda. How come conda cannot reproduce and environment I created with conda?
The solution I found was to remove all the packages that were installed as dependencies and just leave the packages I myself had installed with conda install packagename. Still, basemap was failing. I removed basemap and it worked.
Then I installed basemap with conda install basemap.
Finally, I did a _conda env export, which again was full of dependencies (not only the primary I want). I copied the line corresponding to basemap and I manually edited my environment.yml adding this line there. So, now in environment.yml I only have tha packages I would have installed with conda install when I first created the environment.
This way, except basemap, the package I import in my python scripts will have the same version they had in the environment. Then, the dependencies are those that conda choses.
Later I had the same problem importing another environment from an environment.yml.
I followed a better procedure than in my previous comment.
- I removed from environment.yml the 4 packages that were failing (could not be installed by conda).
- I installed the environment. Now it worked.
- From those 4 packages that failed, only one was "primary" (a package I import on my scripts), so I installed it manually with conda install. This installed this package and the other 3 that were failing, but with new versions.
- I exported the new environment to environment.yml.
Now the environment is almost identical, except for 4 packages whose version changed.
Just here to commiserate - environment.yml from an Ubuntu project wouldn't install on on OS X.
Added a --no-build flag to my export reduced me from loads of packages not found to just 4. I removed those and everything was basically fine.[credit]
Try to make the import of the .yml file directly in the Anaconda Navigator, within the Environments section. It worked for me.
I used Anaconda3 version 4.7.12.
A solution is to create your env without the yml file. Then update it through conda env update --file environment.yml It worked for me
@DavidJulienMillet but how do you create an env without a yml file? I tried 'conda env create' but it just looks for an environment.yml file in the current directory that doesnt exist.
@DavidJulienMillet but how do you create an env without a yml file? I tried 'conda env create' but it just looks for an environment.yml file in the current directory that doesnt exist.
You can use conda create -n test_env python=3.6.3 anaconda
.
Though the env update solution didn't work out for me. It is giving the same ResolvePackageNotFound
running this first conda config --set restore_free_channel true
and then conda env create -f etc
solved it for me
running this first
conda config --set restore_free_channel true
and thenconda env create -f etc
solved it for me
It works lke a charm!
Can you give some explanation for this solution.
running this first
conda config --set restore_free_channel true
and thenconda env create -f etc
solved it for me
Beautiful How does it works though?
running this first
conda config --set restore_free_channel true
and thenconda env create -f etc
solved it for me
works for me thanks
Worked but how?
I tried to create the environment using .yml file but this is the error I got. How to download these specific packages? I tried installing them via Anaconda navigator but it didn't resolve the issue.
ResolvePackageNotFound:
- libcxx=4.0.1
- libedit=3.1
- glib=2.53.6
- libffi=3.2.1
- gettext=0.19.8.1
- libcxxabi=4.0.1
- ptyprocess=0.5.2
- readline=7.0
- terminado=0.6
- libgfortran=3.0.1
- ncurses=6.0
- appnope=0.1.0
- dbus=1.10.22
I had the same problem. It is frustrating, because precisely the point of anaconda is to manage this automatically.
I didn't have any pip packages in my environment.yml, all were packages installed by conda. How come conda cannot reproduce and environment I created with conda?
The solution I found was to remove all the packages that were installed as dependencies and just leave the packages I myself had installed with conda install packagename. Still, basemap was failing. I removed basemap and it worked.
Then I installed basemap with conda install basemap.
Finally, I did a _conda env export, which again was full of dependencies (not only the primary I want). I copied the line corresponding to basemap and I manually edited my environment.yml adding this line there. So, now in environment.yml I only have tha packages I would have installed with conda install when I first created the environment.
This way, except basemap, the package I import in my python scripts will have the same version they had in the environment. Then, the dependencies are those that conda choses.
worked for me... many thanks!
running this first
conda config --set restore_free_channel true
and thenconda env create -f etc
solved it for meIt works lke a charm!
Can you give some explanation for this solution.
I recently a problem with ResolvePackageNotFound and conda config --set restore_free_channel true
fixed it for me as well. It seems that Anaconda removed the free channel due to 1) peformance reasons and 2) Issues with old packages that can result in strange and hard-to-debug errors.
sources: https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/free-channel.html https://www.anaconda.com/blog/why-we-removed-the-free-channel-in-conda-4-7
running this first
conda config --set restore_free_channel true
and thenconda env create -f etc
solved it for me
this didnt work for me. am working on macOS does this have sth to do with operating system?
running this first
conda config --set restore_free_channel true
and thenconda env create -f etc
solved it for methis didnt work for me. am working on macOS does this have sth to do with operating system?
This is a longshot but try brew install miniconda2
. FWIW on my mac with miniconda2 these commands work fine:
conda env export > environment.yml
### (edit environment.yml and change name of env in first line)
conda env create -f environment.yml
But I copy environment.yml
to a 64-bint linux mint box, that also has miniconda2, and it always fails:
conda config --set restore_free_channel true
conda env create -f environment.yml
Collecting package metadata (repodata.json): done
Solving environment: failed
ResolvePackageNotFound:
- tk==8.6.8=ha441bb4_0
- freetype==2.9.1=hb4e5f40_0
... (every single package in the env)
Wonder why it fails spectacularly on linux? Perhaps since I'm having to create a py2 env with some really old obsolete pkgs? (But why does it work fine on macos?) I'll update this post if I figure it out.
=== UPDATE === Ok, it seems it is very hard if not impossible to make a single env.yml that is cross-platform. See https://stackoverflow.com/questions/55554431/conda-fails-to-create-environment-from-yml and https://stackoverflow.com/questions/55554431/conda-fails-to-create-environment-from-yml for example.For me, even with every trick at above sites, including using the sed trick to create a new clean env.yml, I could not get the env that works find in osx to transfer to linux.
So, It looks like you need a different env.yml for each platform. Or use just one env.yml but in a docker as detailed here https://repo2docker.readthedocs.io/en/latest/howto/export_environment.html
I had similar issues when trying to reproduce an environment created on MacOS on an Ubuntu EC2 instance. Using the anaconda guidance for creating cross-platform .yml files that exclude platform specific dependencies solved the issue for me: conda env export --from-history
. After creating my environment.yml file in this manner, I was able to successfully recreate the environment where before I ran into numerous ResolvePackageNotFound errors.
Adding channels to my environment.yml
file fixed things for me.
I noticed the environment described by conda env export;
lists "channels" at the top. Adding some of those allowed things like pytorch
and langdetect
to be resolved properly.
# environment.yml
name: hello
channels:
- pytorch
- conda-forge
- default
dependencies:
- python>=3.8
- pytorch>=1.71
- langdetect
- pandas=1.0.1
- numpy=1.18.1
I just added the "channels" portion.
It turns out that the yaml file was generated in Mac OS, and it is not directly usable in Linux.
Ubuntu Using Anaconda API: https://api.anaconda.org Solving environment: failed
ResolvePackageNotFound:
- opencv3==3.0.0=py35_0
- tbb==4.3_20141023=0
Though I've placed these two requirements under pip section in .yml file im getting the same error. Can you help me out?
Placing the requirements in the pip also did not work for me. I deleted the packages reported by ResolvePackageNotFound in the .yml file, and then Conda is able to install other packages and create the environment.
My error is:
ResolvePackageNotFound: - binutils_impl_linux-64==2.34=h53a641e_0 - ld_impl_linux-64==2.34=h53a641e_0
ResolvePackageNotFound describe all packages not installed yet. That you need to move ResolvePackageNotFound to below pip: sentence looks like:
Before you do this, make sure the package you care about is also in the PIP registry otherwise you are wasting your time.
The solution that worked for me was this:
- Look up the package causing the issue (For me it was one package)
- If it is a Conda specific package, make sure have the channel it is registered on in your
environment.yml
- Update your channels accordingly and see if this resolves your issue
Conclusion
For some reason and somehow Conda installed a package NOT listed in the channels I used in my source Conda environment. Seems like a bug but unsure.
Just my 2 cents, my issue was with ta-lib which requires the conda-forge
channel, but the export does not include this info so the yaml file is unusable.
name: mql5
channels:
- defaults
dependencies:
- pip
- ta-lib
- python=3
- graphviz
- pywin32
prefix: C:\Users\worth\anaconda3\envs\mql5