I am currently working with GeoPython - Auto GIS. After research on the work flow with conda+python, I have found out how to create and specify the packages in an environment.yml file. But I found no way to specify an optional arguement. An example is as follows,
The equivalent of this conda command
conda install -y -c conda-forge geopandas
is the following in environment.yml
name: parkar
channels:
- conda-forge
- defaults
dependencies:
- geopandas
(See how conda environment files are made at section Conda Environment Files of this link)
But I could not find a way to specify the following command [a],
conda install -y -c conda-forge basemap=1.0.8.dev0 --no-deps
I did try it like this,
- basemap=1.0.8.dev0 --no-deps
But ended up with the following promt when I ran conda env update --file environment.yml
CondaValueError: invalid package specification: basemap=1.0.8.dev0 --no-deps
I also tried exporting the environment.yml file of the 'base' conda environment after running the above command [a] and got the following line where basemap=1.0.8.dev0 dependency was at,
- basemap=1.0.8.dev0=np111py35_1
Any one ever encountered this problem or has a solution?
yml file. Note that by convention Conda environment files are called environment. yml . As such if you use the conda env create sub-command without passing the --file option, then conda will expect to find a file called environment.
A . yml file is a text file that contains a list of dependencies and which channels you prioritize downloading them on. You can use the earth-analytics-python yaml file called environment.
conda env create --name NAME --file FILE where FILE is the YAML file and NAME is what you want to name the environment. (The accepted answer used to suggest conda create, but that only works on the output of conda list --explicit, not on Conda environment YAML files.)
Create the environment from the environment.yml file: conda env create -f environment.yml The first line of the yml file sets the new environment's name. For details see Creating an environment file manually.
The packages listed in the yml should be installed to the created conda env, however they are not.
Environments take up little space thanks to hard links. Care should be taken to avoid running pip in the root environment. Once pip has been used, conda will be unaware of the changes. To install additional conda packages, it is best to recreate the environment.
Specifying the optional argument as follows resulted in avoiding the above error
- basemap=1.0.8.dev0 [--no-deps]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With