pydev project - no module named pyodbc

 ̄綄美尐妖づ 提交于 2019-12-11 04:26:49

问题


Hello guys I am pretty new to all this so please bear with me. I am trying to execute the following python code on eclipse but finding some errors:

import pyodbc
from bs4 import BeautifulSoup

I get the following error for both:

import pyodbc
ModuleNotFoundError: No module named 'pyodbc'
   import BeautifulSoup
ModuleNotFoundError: No module named 'BeautifulSoup'

When going to command prompt and clicking on pip install pyodbc I get the following:

Requirement already satisfied: pyodbc in c:\users\sammy\anaconda3\lib\site-packages

What should I do? Many thanks.


回答1:


When you are on eclipse just go to here ,

windows->preferences->python interpreter->select path of your python interpreter

Now Click on button install/uninstall with pip and type pyodbc there as shown in pic 2 . Now click on Run . Then restart your eclipse again . It should solve your issue.



来源:https://stackoverflow.com/questions/48427514/pydev-project-no-module-named-pyodbc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!