Ich bin neu in Anaconda Version von Python, und schon stoße ich auf unangenehme Probleme.Anaconda nicht gefunden meine Pakete mit `pip` installiert
Ich installierte Anaconda pro the instructions here, und es funktionierte wie Charme, mit allen enthaltenen Paketen ordnungsgemäß importiert, wenn gefordert. Dann ging ich auf ein paar zusätzliche Pakete zu installieren, die Anaconda nicht mit pip
in erster Linie eingeschlossen hat:
$ sudo pip install BeautifulSoup mrjob pattern
Die Installationen, perfekt zu sein scheint, 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]:
Lustige Sache ist, können diese Pakete sehr gut importiert werden, wenn ich nicht das Anaconda Bündel von python läuft, nach dem Entfernen
# added by Anaconda 1.8.0 installer
export PATH="/home/username/anaconda/bin:$PATH"
fr om mein .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 irgendetwas während jeder dieser Installationen vermissen, die ich lief? Soll ich diese Pakete manuell mit Anaconda verknüpfen, damit sie weiß, wo sie zu finden sind?
Was gibt 'pip' aus? Enthält '/ home/username/anaconda/bin'' pip'? Was ist mit 'easy_install'? – icktoofay
'die pip' Ausgänge'/usr/bin/pip' und '~/anaconda/bin /' enthält 'pip'. 'easy_install' verhält sich ungefähr gleich. – alxyzc
heißt das, ich sollte '~/anaconda/bin/pip' anstelle des Systems' pip' verwenden? – alxyzc