0

I have sqlalchemy installed but when I try and import sqlachemy it comes up with an error

(base) Benjamats-Air:sqlalchemy_test benjamattesjaroen$ pip install sqlalchemy
Requirement already satisfied: sqlalchemy in /Users/benjamattesjaroen/anaconda3/lib/python3.7/site-packages (1.3.5)

(base) Benjamats-Air:sqlalchemy_test benjamattesjaroen$ python
Python 2.7.10 (default, Feb  7 2017, 00:08:15) 
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlalchemy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named sqlalchemy
>>>  
Ilja Everilä
  • 50,538
  • 7
  • 126
  • 127
Runner Bean
  • 4,895
  • 12
  • 40
  • 60
  • 5
    The first thing to note is that pip is telling you it has installed to a python **3** installation, but the one you're running is 2.7. – Ilja Everilä Oct 09 '19 at 19:06
  • 1
    [Can I ask questions about installation in SO?](https://meta.stackoverflow.com/questions/338203/can-i-ask-questions-about-installation-in-so) Questions about software tools commonly used by programmers must be **a practical, answerable problem unique to software development.** – Trenton McKinney Oct 09 '19 at 19:07
  • You'll likely find help from these: https://stackoverflow.com/questions/15052206/python-pip-install-module-is-not-found-how-to-link-python-to-pip-location, https://stackoverflow.com/questions/37341614/modules-are-installed-using-pip-on-osx-but-not-found-when-importing – Ilja Everilä Oct 09 '19 at 19:14
  • @IljaEverilä thanks that solved the problem – Runner Bean Oct 09 '19 at 19:21

0 Answers0