New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
conda env create --file
errors one package at a time
#6073
Comments
+1 |
I run into the same issue.
gives me:
I suspect that this has something to do with "channels" and how conda sorts dependencies. I therefore wanted to see whether the situation would be solved by using the old "sorting algorithm":
and then again:
to no avail. |
Is anyone looking into this? I am experiencing the same problem after exporting a conda environment on macOS and then trying to reproduce the environment on Ubuntu 16.04. Actually this is literally the only thing I did.
I exported using
I also tried to first create a conda environment without the file, then install from the file, with a different error:
This is the same error I receive if I try to create the environment from the file using |
Oftentimes build numbers don't match across platforms. Use the
|
What I have generally been doing to work around this is to hand craft environment files rather than using |
Thanks for the
Note: I also ran Is there a simple explanation here? The linux channels are not in-sync with the macOS channels? Or... I'm fairly new to python... Can package dependencies vary depending on the destination platform? @mivade, good idea... Glad to hear it's a working path forward. It kind of defeats the purpose of using an environment manager, though — even if I am open to it, it would be ridiculous to try to get my team on-board, and expect them to learn how to do it and get it right, with complexities such as channels, etc. But I'm not sure what other option I have right now! For reference, I believe I have already wasted too much time on these issues to dig any further on my own. If you have other ideas, I will definitely give them a shot. |
The reason this issue is tagged as a feature request and with the “environment-spec” tag is because we know there’s quite a bit of work we need to do here to improve the user experience. Indeed |
I also am blocked by the libcxx issue
Like the original poster said, very aggravating that it takes 10s to see the failure, then fixing it just brings on more. Can't there be a switch to just install everything possible from the environment, then alert which ones failed afterward? This defeats the #1 promise of anaconda being a solution to the "runs on my computer" problem. The biggest/only thing I want from anaconda is the export reqs and import reqs to work flawlessly. Is there another workflow I'm missing that is the intended path of deploying code to another computer? I thought it was supposed to be |
Have the same problem, had to manually remove the dependencies causing the error from the env file. ResolvePackageNotFound:
Exported the env from macOS and tried to import on Linux |
+1 |
Exactly same problem like @gabegm even if I used
Had to manually remote the dependencies
which should be handle more gracefully by conda. |
Same problem conda env create --force -f=/Users/ryanrunchey/Downloads/gcloud_ryanrunchey_starling_conda_env_base_2018-07-25/environment.yml -n gcloud_starling_base Using Anaconda API: https://api.anaconda.org ResolvePackageNotFound:
|
Same problem on ubuntu conda.exceptions.ResolvePackageNotFound:
|
@howie, you cannot share env files between OSes, your env file has come from macOS here. @leemengtaiwan, you said:
There's nothing conda can do about this, environment files are there to explicitly lock the exact package set. Now that's going to differ across OSes for obvious reasons. |
My suggestion is that you generate an env file on each OS and then update your tooling to use the appropriate one given the current OS. |
@mingwandroid thanks for your information 😂 |
@mingwandroid Is there a way to get |
Same problem here. ResolvePackageNotFound:
Things I've tried:
These steps seemed to do it, but I think it was only no. 3 that fixed the issue as I tried the first two individually to no avail. |
It appears this is what most people (including me) end up doing most of the time. |
I came across this issue when trying to export my #!/usr/bin/env python
import subprocess
import re
import sys
env_filepath = sys.argv[1]
with open(env_filepath, 'r') as f:
env_yml = f.read()
env_name = re.search('^name: (.+)', env_yml, flags=re.MULTILINE).group(1)
env_export = subprocess.check_output(
'conda env export --name ' + env_name + ' --no-builds', shell=True
).strip().decode('utf-8')
for line in env_yml.split('\n'):
if line:
m = re.search(line.strip() + '(==?.+)', env_export, flags=re.MULTILINE)
if m:
print(line + m.group(1))
else:
print(line)
else:
print() Just pass your |
Getting same error while creating conda environment ResolvePackageNotFound:
|
+1 on the --ignore-missing suggestion. Please implement this. I can manually drop the incorrect libraries out of generated file, but this doesn't protect me from changes that can happen in future packaging in conda and conda-forge. |
Same problem. libssh2 |
I would also be interested in a solution that allows to properly move envs around by just creating a yml. For me it is:
|
Same problem had to manually remove the packages causing errors. |
I had the same problem with I circumvented the problem by starting a docker image that runs linux/conda
creating my conda env there from scratch and exporting it.
Then I copied the file to my MacOS machine for further use |
Same problem.
I'm using macos for development and linux for production. I exported conda env on mac, tried to create the same env in linux, and shows these error. The reason is libcxx and libcxxabi are macos only packages. They are not in linux channel. I think we should think a solution to deal with platform specific packages. |
It's been years that folks want this issued to be solved and I'm one of them. While being a fan of miniconda, I see other package managers (like poetry?) deal with cross platform problem well. |
A Conda running on Linux can be forced to use macOS packages when resolving environments. I use this to create proper The trick is to temporarily add this to
With this, Conda will happily create macOS environments even on Linux. These will not be functional, of course, but can then be I believe this works also in the other direction, that is, creating Linux environments on macOS. Here’s a cleaned-up version of the script I’m using: This is slightly hackish of course, but may be helpful until we get a proper solution. |
We were hoping to use env.yml to enable reproducible build, but it turns out that conda cannot always recreate an environment it has just exported! https://stackoverflow.com/q/49154899 conda/conda#6073
Hello. Thank you for this script. Please how do I use it as in your last statement " Just pass your |
Hi! |
i thought anaconda was specifically doing this... i thought that the whole point of a yml file was to download EXACTLY what a program needs for its dependencies. |
@PowerToThePeople111 @howie @Arslan-Zaidi @leemengtaiwan it seems that some precise versions of packages only exist for osx: |
Hi there, thank you for your contribution to Conda! This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs. If you would like this issue to remain open please:
NOTE: If this issue was closed prematurely, please leave a comment and we will gladly reopen the issue. In case this issue was originally about a project that is covered by the Anaconda issue tracker (e.g. Anaconda, Miniconda, packages built by Anaconda, Inc. like Anaconda Navigator etc), please reopen the issue there again. Thanks! |
Hi again! This issue has been closed since it has not had recent activity. Thank you for your contribution. |
is there really no solution to this? We just have to manually remove these packages? |
I have the same issue, beginning to think the |
Yeah I've never been a fan of bots that close issues just because there haven't been any comments in a while. AFAIK this is still an issue. I only ever craft |
Seems we have to remove these packages manually to get the yml file to work. I tried move these packages from dependencies to the pip section and the problem not solved! |
When trying to create a new environment from a environment YAML file that was created on one operating system, I get errors such as the following when running on another OS:
The problem is that as soon as I comment the offending package out (since it is likely not a hard requirement, but rather just something that happened to be installed by whomever created the environment file), I just get another similar error for another package.
Considering it can take 10s of seconds before getting this error, it would be especially helpful to be presented with a list of all packages that can't be found instead of having to hunt them one at a time.
The text was updated successfully, but these errors were encountered: