Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix "CondaValueError: Invalid environment name" in conda terminal when I use "conda env export"?

Tags:

conda

anaconda

I want to export my conda environment by using conda env export > xxx.yml,but it doesn't work.

My conda environment is created by specify the --prefix, it names "E:/Envs/DRF".To export it, I use conda activate E:/Envs/DRF make it activated.And then I use conda env export > xxx.yml,it doesn't work and I get some Error below.

Firstly,activate it:

E:\WorkSpace\PyCharm\CET6Cat>conda activate E:/Envs/DRF

And then I wanna export it to .yml file:

(E:\Envs\DRF) E:\WorkSpace\PyCharm\CET6Cat>conda env export > environment.yml
WARNING: The conda.compat module is deprecated and will be removed in a future r
elease.
WARNING: The conda.compat module is deprecated and will be removed in a future r
elease.

CondaValueError: Invalid environment name: 'E:\Envs\DRF'
  Characters not allowed: ('/', ' ', ':')

It doesn't work!

like image 876
LauZyHou Avatar asked Apr 13 '19 01:04

LauZyHou


People also ask

What is prefix in conda?

Create a new conda environment from a list of specified packages. To use the created environment, use 'conda activate envname' to look in that directory first. This command requires either the -n NAME or -p PREFIX option.


1 Answers

Try

conda env export --prefix /home/..../tfpy37 > dependency.yml

Here tfpy37 is my conda environment name located in my ubuntu directory /home/....

like image 65
Uzzal Podder Avatar answered Sep 19 '22 16:09

Uzzal Podder