Comments (7)
@AlbertDeFusco I think that if you have an environment.yml
file inside a directory/folder and then do anaconda-project init
(or the right command, can't remember now) should search for that and use it.
Is not this the case @havocp ?
from anaconda-project.
Yes, if you put environment.yml in a folder and anaconda-project init
that folder it should import it. You can also cut-and-paste into an anaconda-project.yml that you have (rename dependencies
to packages
I think is the only format difference).
from anaconda-project.
Are things working for you, can this issue be closed?
from anaconda-project.
Perhaps not. I created a new project in Navigator
# This is an Anaconda project file.
#
# Here you can describe your project and how to run it.
# Use `anaconda-project run` to run the project.
# The file is in YAML format, please see http://www.yaml.org/start.html for more.
#
#
# Set the 'name' key to name your project
#
name: new_proj
#
# Set the 'icon' key to give your project an icon
#
icon:
#
# In the commands section, list your runnable scripts, notebooks, and other code.
# Use `anaconda-project add-command` to add commands.
#
commands: {}
#
# In the variables section, list any environment variables your code depends on.
# Use `anaconda-project add-variable` to add variables.
#
variables: {}
#
# In the services section, list any services that should be
# available before your code runs.
# Use `anaconda-project add-service` to add services.
#
services: {}
#
# In the downloads section, list any URLs to download to local files
# before your code runs.
# Use `anaconda-project add-download` to add downloads.
#
downloads: {}
#
# In the packages section, list any packages that must be installed
# before your code runs.
# Use `anaconda-project add-packages` to add packages.
#
packages: []
#
# In the channels section, list any Conda channel URLs to be searched
# for packages.
#
# For example,
#
# channels:
# - https://conda.anaconda.org/asmeurer
#
channels: []
#
# You can define multiple, named environment specs.
# Each inherits any global packages or channels,
# but can have its own unique ones also.
# Use `anaconda-project add-env-spec` to add environment specs.
#
env_specs: {default: {packages: [anaconda], channels: []}}
I then copy the environment.yml
to the project directory.
>anaconda-project init
Environment spec 'my_env' from environment.yml is not in anaconda-project.yml.
Unable to load the project.
Is there something I have to do to register the environment name?
from anaconda-project.
Ah, the issue is that you already have a project here when you init. I opened #53 on that, it should say "project is already initialized" or something maybe.
If you do anaconda-project anything-except-init
it may ask you whether you want to import that environment. However, you'll then have default
and my_env
env specs, and you'll have to delete the extra one.
What should also work is if you had not initialized already, i.e. you had environment.yml and NOT anaconda-project.yml, then anaconda-project init
would use the environment.yml to create the default environment in the new anaconda-project.yml
.
Maybe it's simpler to just have a command like anaconda-project import environment.yml
, opened #54 to think about that.
from anaconda-project.
Thanks! That's what I needed. I removed the anaconda-project.yml
and ran anaconda-project init
. That correctly imported the env into the new project file as
env_specs: {my_env: {packages: [python=3, jupyter, nbformat, pandoc, bokeh, pygithub,
{pip: [pypandoc]}], channels: [conda-forge]}}
from anaconda-project.
Still works
from anaconda-project.
Related Issues (20)
- [ENH] Escaping to shell for commands inside `anaconda-project.yml`
- [BUG] Certain environments in windows result in mangled prompts
- [BUG] CondaHTTPError: HTTP 000 CONNECTION FAILED for url HOT 2
- [ENH] boostrap re-locking HOT 2
- [ENH] Local condarc
- [BUG] HOT 1
- [BUG] Document skip_imports HOT 2
- [BUG] infinite loop on windows: searching for files HOT 1
- [BUG] environments aren't created unless referenced in commands HOT 1
- [BUG] `anaconda-project prepare` doesn't recognize `osx-arm64` platform HOT 1
- How do I compile dlib (with compile options -O3 and -mavx) for use in anaconda? HOT 1
- [ENH] Implicit "defaults" channel HOT 4
- How to find the library owned by which package? HOT 1
- [BUG] "Failed to initialize Anaconda directories": can't install Anaconda on Windows HOT 3
- [BUG] CONDA_SUBDIR difficulties. HOT 2
- [BUG] env_specs not respected.
- Is there an api to search for packages?
- [BUG]
- [ENH] why conda install is not replaced by mamba install by default ? (Anaconda Enterprise)
- [BUG] Cross-platform locking failing on recent Python versions with `defaults` from arm64 to linux-64 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anaconda-project.