"SpecNotFound: Invalid name, try the format: user/package" in Creating new Conda env with yml file (Windows 10)
Question:
I’m trying to Create New conda environment by ‘Anaconda Prompt’ usnig yml
File in Windows 10.
So here is the steps i made through:
1. using cd
command i changed the directory to dir which my yml
file located. (suppose my yml file is in c:/Users/<USER NAME>/.jupyter
)
2. Then i used conda env create -f Python 310.yml
command to create new conda env.
and what i got is:
SpecNotFound: Invalid name, try the format: user/package
Now I don’t know how can I solve this problem and exactly what is the meaning of this error.
Appendix
my Python 310.yml
file contains these stuff:
Answers:
issue solved by changing contents of Python 310.yml
and renaming yml
file to Python310.yml
. Here is the final .yml
file content:
name: Python3.9
channels:
- defaults
dependencies:
- numpy
- pandas
- matplotlib
- pip
- python=3.9.*
- python-dateutil
- pytz
- scikit-learn
- scipy
- statsmodels
- xlrd
- openpyxl
- lxml
- html5lib
- beautifulsoup4
- jupyter
- pip:
- pmdarima
- tensorflow
- keras
prefix: C:UsersShayanAnaconda3envsPython3.9
You can use conda create -f Python 310.yml
.
drop the "env" in "conda env create" it’s just "conda create …"
In my case the problem was that the file did not exist. So make sure that the file exists before running the update command.
Make sure your directory is in "quotes", bc I got this error having whitespace inside it…
The other answer says to:
drop the "env" in "conda env create" it’s just "conda create …"
This did not fix it for me by itself, but it did work after trying that and then after that trying the whole
conda env create -n myenv-dev --file my_env.yml
command again.
My solution was because I was running the following command on windows
conda env create -n spa --file .environment.yml
and in order to get it to run on my Ubuntu WSL2 just needed a minor update:
conda env create -n spa --file environment.yml
I put the name of the yml file in double quotes and used the -f= notation and powershell no longer gave me an error. For you, that might mean:
conda env create -f="Python 310.yml"
I’m trying to Create New conda environment by ‘Anaconda Prompt’ usnig yml
File in Windows 10.
So here is the steps i made through:
1. using cd
command i changed the directory to dir which my yml
file located. (suppose my yml file is in c:/Users/<USER NAME>/.jupyter
)
2. Then i used conda env create -f Python 310.yml
command to create new conda env.
and what i got is:
SpecNotFound: Invalid name, try the format: user/package
Now I don’t know how can I solve this problem and exactly what is the meaning of this error.
Appendix
my Python 310.yml
file contains these stuff:
issue solved by changing contents of Python 310.yml
and renaming yml
file to Python310.yml
. Here is the final .yml
file content:
name: Python3.9
channels:
- defaults
dependencies:
- numpy
- pandas
- matplotlib
- pip
- python=3.9.*
- python-dateutil
- pytz
- scikit-learn
- scipy
- statsmodels
- xlrd
- openpyxl
- lxml
- html5lib
- beautifulsoup4
- jupyter
- pip:
- pmdarima
- tensorflow
- keras
prefix: C:UsersShayanAnaconda3envsPython3.9
You can use conda create -f Python 310.yml
.
drop the "env" in "conda env create" it’s just "conda create …"
In my case the problem was that the file did not exist. So make sure that the file exists before running the update command.
Make sure your directory is in "quotes", bc I got this error having whitespace inside it…
The other answer says to:
drop the "env" in "conda env create" it’s just "conda create …"
This did not fix it for me by itself, but it did work after trying that and then after that trying the whole
conda env create -n myenv-dev --file my_env.yml
command again.
My solution was because I was running the following command on windows
conda env create -n spa --file .environment.yml
and in order to get it to run on my Ubuntu WSL2 just needed a minor update:
conda env create -n spa --file environment.yml
I put the name of the yml file in double quotes and used the -f= notation and powershell no longer gave me an error. For you, that might mean:
conda env create -f="Python 310.yml"