I activate the virtual environment in VSCode terminal:
and I check the pip list:
I can see the sklearn pip. So I enter
import sklearn
in script but script can't find sklearn.
what is the problem? Isn't the virtual environment activated just by typing in the terminal?
It's fine. Try to run this code and you won't get exceptions. To avoid this underscore pip install autopep8
might help
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.