0

I installed pyodbc on my Raspberry Pi with the following

sudo apt-get install python-pyodbc

and

pip install pyodbc

When I try to import pyodbc, I can only do so in the Python 2.7 Shell. In Python 3.5 Shell I get "No Module named 'pyodbc'. How can I ensure the pyodbc is enabled for Python 3.5 when I install?

BenOnline
  • 117
  • 1
  • 4
  • 11
  • Possible duplicate of [How to use pip with Python 3.x alongside Python 2.x](https://stackoverflow.com/questions/11268501/how-to-use-pip-with-python-3-x-alongside-python-2-x) – YPCrumble Feb 08 '18 at 19:01

1 Answers1

1

Usually when you install pip, there are a few versions of pip that you can call. On my machine (not RP though):

myid@mymachine:~$ pip
pip     pip2    pip2.7  pip3    pip3.5  pip3.6  pipenv

You can use pip3 to install packages for your python3.

TYZ
  • 8,466
  • 5
  • 29
  • 60