I get the following error when I run the below code:
name: myapp-env
dependencies:
- python=3.5
- pip
- django=1.8
- pip:
- django-environ=0.4
Error:
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "<string>", line 7, column 1:
- django-environ=0.4
What is the proper way to format the .yml file to pip install a package?
It's fully recommended to use pip inside of conda. It's better to install using conda, but for any packages that don't have a conda build, it's perfectly acceptable to use pip.
It's quite explicit there: YAML (as implemented in pyyaml) forbids the use of tab-characters for indentation. Change that line to <space><space><space><space>- django-environ=0.4
.
I noticed my problem. I was using Sublime text and Indentation was set to Tab. I selected Convert Indentation to Spaces
and it worked.
Also, the .yml file should be as follows (two == for pip package version).
name: myapp-env
dependencies:
- python=3.5
- pip
- django=1.8
- pip:
- django-environ==0.4
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