2017-01-21 4 views
1

In Python 2.7.9 Ich habe versucht, bottleneck ohne sudo Zugriff zu installieren und verwenden Sie eine der Funktionen argpartsort. Aber das ist, was passiert:AttributError: 'Modul' Objekt hat kein Attribut 'argpartsort'

import bottleneck as bn 
bn.argpartsort 
Traceback (most recent call last): 
File "<stdin>", line 1, in <module> 
AttributeError: 'module' object has no attribute 'argpartsort' 

ich verschiedene Methoden ausprobiert:

pip install --user bottleneck 
Requirement already satisfied (use --upgrade to upgrade): bottleneck in $HOME/.local/lib/python2.7/site-packages/Bottleneck-1.3.0.dev0-py2.7-linux-x86_64.egg 
Requirement already satisfied (use --upgrade to upgrade): numpy in $HOME/.local/lib/python2.7/site-packages (from bottleneck) 
Cleaning up... 

Ich habe versucht, die Sourcen:

 python setup.py install --user 
Installed $HOME/.local/lib/python2.7/site-packages/Bottleneck-1.3.0.dev0-py2.7-linux-x86_64.egg 
Processing dependencies for Bottleneck==1.3.0.dev0 
Searching for numpy==1.12.0 
Best match: numpy 1.12.0 
Adding numpy 1.12.0 to easy-install.pth file 

Using $HOME/.local/lib/python2.7/site-packages 
Finished processing dependencies for Bottleneck==1.3.0.dev0 

ich dann versucht:

pip install --install-option="--prefix=$HOME/.local" bottleneck 
Requirement already satisfied (use --upgrade to upgrade): bottleneck in $HOME/.local/lib/python2.7/site-packages/Bottleneck-1.3.0.dev0-py2.7-linux-x86_64.egg 
Requirement already satisfied (use --upgrade to upgrade): numpy in $HOME/.local/lib/python2.7/site-packages (from bottleneck) 
Cleaning up... 

I versucht, die Umgebungsvariable zu exportieren:

export PYTHONPATH="$HOME/.local/lib/python2.7/site-packages" 

aber ohne Glück.

Wie kann ich:

>>> import bottleneck as bn 
>>> bn.argpartsort 

und um diese Fehlermeldung erhalten:

AttributeError: 'module' object has no attribute 'argpartsort' 

ohne sudo Berechtigungen

ich bin:

Distributor ID: Debian 
Description: Debian GNU/Linux 8.6 (jessie) 
Release: 8.6 
Codename: jessie 

Ich schätze Ihre Hilfe, jedoch minimal.

Grüße

Antwort

0

Es ist wahrscheinlich nichts falsch mit Ihrem installieren.

Überprüfen Sie die Bottleneck 1.2.0 Release Notes:

Functions partsort and argpartsort have been renamed to partition and argpartition to match NumPy.

+0

Thank you very much. – Learner

Verwandte Themen