问题
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