Anaconda findet meine mit `pip` installierten Pakete nicht
Ich bin neu in der Anaconda-Version von Python und stoße bereits auf unangenehme Probleme.
Ich habe Anaconda per installiertdie anweisungen hier, und es funktionierte wie mit Charme, mit allen enthaltenen Paketen ordnungsgemäß importiert, wenn nachgefragt. Dann installierte ich einige zusätzliche Pakete, die Anaconda überhaupt nicht beinhaltetepip
:
$ sudo pip install BeautifulSoup mrjob pattern
Die Installationen scheinen perfekt zu sein, aber wenn ich versuche, sie in ipython zu importieren, werden die Dinge frustrierend:
Python 2.7.6 |Anaconda 1.8.0 (64-bit)| (default, Nov 11 2013, 10:47:18)
Type "copyright", "credits" or "license" for more information.
IPython 1.1.0 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import BeautifulSoup
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-1-aa1e12a76f5e> in <module>()
----> 1 import BeautifulSoup
ImportError: No module named BeautifulSoup
In [2]: import mrjob
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-2-6ea1b9bda48b> in <module>()
----> 1 import mrjob
ImportError: No module named mrjob
In [3]: import pattern
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-3-4b662941bac1> in <module>()
----> 1 import pattern
ImportError: No module named pattern
In [4]:
Das Komische ist, dass diese Pakete sehr gut importiert werden können, wenn ich nach dem Entfernen nicht das Anaconda-Python-Bundle ausführe
# added by Anaconda 1.8.0 installer
export PATH="/home/username/anaconda/bin:$PATH"
Von meinem.bashrc
:
Python 2.7.5+ (default, Sep 19 2013, 13:48:49)
Type "copyright", "credits" or "license" for more information.
IPython 0.13.2 -- An enhanced Interactive Python.
? -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help -> Python's own help system.
object? -> Details about 'object', use 'object??' for extra details.
In [1]: import BeautifulSoup
In [2]: import mrjob
In [3]: import pattern
In [4]:
Habe ich bei einer dieser Installationen, die ich ausgeführt habe, etwas verpasst? Sollte ich diese Pakete manuell mit Anaconda verknüpfen, damit es weiß, wo es sie findet?