Ich benutze Python 2.7 seit einiger Zeit auf diesem Rechner; Ich musste die Anaconda-Distribution mit Python 3.5 für ein Teamprojekt installieren.Finden von korrekten Paketversionen mit Standalone Python 2.7 und Anaconda/Python 3.5 auf demselben Computer (Mac)
ich erfolgreich Python installiert 3.5, und jetzt python
Punkte auf Python 3.5, aber wenn ich import numpy
versuchen, mein System geht für numpy an dem Ort, wo meine Pakete für 2,7 liegen:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/numpy/__init__.py", line 180, in <module>
from . import add_newdocs
File "/Library/Python/2.7/site-packages/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/Library/Python/2.7/site-packages/numpy/lib/__init__.py", line 8, in <module>
from .type_check import *
File "/Library/Python/2.7/site-packages/numpy/lib/type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File "/Library/Python/2.7/site-packages/numpy/core/__init__.py", line 14, in <module>
from . import multiarray
ImportError: dlopen(/Library/Python/2.7/site-packages/numpy/core/multiarray.so, 2): Symbol not found: _PyBuffer_Type
Referenced from: /Library/Python/2.7/site-packages/numpy/core/multiarray.so
Expected in: flat namespace
in /Library/Python/2.7/site-packages/numpy/core/multiarray.so
I‘ habe versucht, ~/anaconda/pkgs
zu meiner PYTHONPATH
Variable vor /Library/Python/2.7/site-packages
hinzuzufügen, aber das scheint nicht zu helfen. Obwohl ich mich darauf konzentriere, die Dinge in 3.5 zum Laufen zu bringen, möchte ich in der Lage sein, sowohl Python 2.7 als auch 3.5 zu verwenden, also möchte ich 2.7 nicht deinstallieren oder den Zeiger auf den Package-Speicherort dieser Version vollständig entfernen.