2017-09-12 1 views
1

Ich versuche ein Paket mit Pip in einem Conda env zu installieren. So habe ich eine environment.yml Datei wie folgt:Pip und Conda environment.yml: nicht unterstützte Operandentyp (en) für +: 'NoneType' und 'list'

name: test-env 

dependencies: 
    - pip: 
     - "git+https://github.com/choldgraf/download" 

Aber wenn ich conda env update --file environment.yml laufen, erhalte ich:

Using Anaconda API: https://api.anaconda.org 
Fetching package metadata ............. 
Solving package specifications: An unexpected error has occurred. 
Please consider posting the following information to the 
conda GitHub issue tracker at: 

# Here some configuration that I omit  

Traceback (most recent call last): 
    File "/home/mathurin/anaconda3/lib/python3.5/site-packages/conda/exceptions.py", line 634, in conda_exception_handler 
    return_value = func(*args, **kwargs) 
    File "/home/mathurin/anaconda3/lib/python3.5/site-packages/conda_env/cli/main_update.py", line 106, in execute 
    installer.install(prefix, specs, args, env, prune=args.prune) 
    File "/home/mathurin/anaconda3/lib/python3.5/site-packages/conda_env/installers/pip.py", line 8, in install 
    pip_cmd = pip_args(prefix) + ['install', ] + specs 
TypeError: unsupported operand type(s) for +: 'NoneType' and 'list' 

jedoch nur pip install git+https://github.com/choldgraf/download in meine Bash-Konsole eingeben funktioniert gut. Was mache ich falsch ?

EDIT: Mein erster Gedanke war, Conda zu aktualisieren. Ich bin jetzt in der Version 4.3.23, und zu versuchen, conda update conda ergibt:

# All requested packages already installed. 
# packages in environment at ~/anaconda3: 
# 
conda      4.3.23     py35_0 conda-forge 
+0

Welche Version von 'conda' haben Sie? – darthbith

+0

Was ist, wenn Sie Conda aktualisieren? Die Version, die ich habe, ist 4.3.25 – darthbith

+1

Ah, Sie haben von 'Conda-Schmiede installiert. Wenn du das aktualisieren willst, kannst du 'conda install conda = 4.3.25' eingeben und sehen, ob es das Problem löst, obwohl es vielleicht nicht ... – darthbith

Antwort

0

Ich hatte das gleiche Problem. Ich habe eine Lösung gefunden. Sie müssen Ihrer Konfiguration mindestens eine Abhängigkeit hinzufügen (ich bin mir nicht sicher, ob es sich um einen Pip handelt). In meiner Konfiguration habe ich pip=9.0.1=py35_1 hinzugefügt

name: myenv 
channels: 
- defaults 
dependencies: 
- pip=9.0.1=py35_1 
- pip: 
    - tqdm==4.19.5 

Also ich denke, in Ihrem Fall wäre es so etwas wie:

name: test-env 
dependencies: 
- pip=9.0.1=py35_1 
- pip: 
    - "git+https://github.com/choldgraf/download" 
Verwandte Themen