0

I cannot get pip install pyodbc to work

I downloaded get-pip.py, I have tried to trace paths to ensure everything is in the right place. I looked in the package descriptions pip is there, install is in the package.

pip install pyodbc

Syntax error in command prompt If I just try to execute the import pyodbc in python IDLE it says the pyodbc module does not exist

hem
  • 968
  • 4
  • 10
  • Is this on Windows? Are you sure `pip` is on your system PATH? How did you install Python? Please include the **exact** error message you're getting when you run `pip install pyodbc`. – Mihai Chelaru Aug 14 '19 at 02:58
  • Windows 8, I don't know how to check if pip is on my system path. I installed python via python.org the executable 64 bit file. And it says, " File "", line 1 pip install pyodbc" with a carrot `^` under the last l in install – Amanda Lacy Ramirez Aug 14 '19 at 03:05
  • I have also installed the ODBC. I uninstalled python, installed the ODBC then reinstalled python. That fixed the error message I was receiving while looking at the pip package but not the syntax error when trying to use pip to install pyodbc – Amanda Lacy Ramirez Aug 14 '19 at 03:14
  • 1
    Possible duplicate of [Why does "pip install" inside Python raise a SyntaxError?](https://stackoverflow.com/questions/8548030/why-does-pip-install-inside-python-raise-a-syntaxerror) – Mihai Chelaru Aug 14 '19 at 03:19
  • I have run it in both and neither have been succsssful – Amanda Lacy Ramirez Aug 14 '19 at 03:23
  • In that case check [this question out](https://stackoverflow.com/questions/23708898/pip-is-not-recognized-as-an-internal-or-external-command) if you don't have `pip` added to your system PATH. – Mihai Chelaru Aug 14 '19 at 03:31
  • Alright! Thank you. I have it executing now. Next issue now I put the pip install pyodbc and it seems to execute but then when I try to import pyodbc in python it says that it doesn't exist and I have changed the directory into where the install put pyodbc in scripts.... – Amanda Lacy Ramirez Aug 14 '19 at 03:51
  • Where are you executing the `import` statement? What is the exact error message? Please [edit](https://stackoverflow.com/posts/57487612/edit) this information into your question so that there's enough detail there to answer your question. Do you have multiple Python installations? It could be that whatever program you're running the import from is using a different Python interpreter to the one you installed `pyodbc` into with `pip`. – Mihai Chelaru Aug 14 '19 at 12:53

0 Answers0