PS C:\Users\moon2> & C:/Users/moon2/AppData/Local/Programs/Python/Python312/python.exe…
Jump to turn (11)
- 1PS C:\Users\moon2> & C:/Users/moon2/AppData/Local/Programs/Python/Python312/pyth
- 2it is intalled but i have two versions of python anaconda and visual
- 3C:\Users\moon2>python --version Python 3.12.0 C:\Users\moon2>
- 4how to change to anaconda i visual code
- 5i installed all libraries when i use anaconda interpreter it sayes yfiance is no
- 6i want to use offical payhton interpreter
- 7how to insure that both libraries are installed in the right directory
- 8C:\Users\moon2> pip install scikit-learn Collecting scikit-learn Downloading sci
- 9import yfinance as yf import numpy as np import pandas as pd from sklearn.models
- 10Installing collected packages: threadpoolctl, scipy, joblib, scikit-learn Succes
- 11File "c:\Users\moon2\OneDrive\سطح المكتب\aa.py", line 7, in import skeleton Modu
- User
PS C:\Users\moon2> & C:/Users/moon2/AppData/Local/Programs/Python/Python312/python.exe "c:/Users/moon2/OneDrive/سطح المكتب/aa.py" Traceback (most recent call last): File "c:\Users\moon2\OneDrive\سطح المكتب\aa.py", line 4, in from sklearn.model_selection import train_test_split ModuleNotFoundError: No module named 'sklearn' PS C:\Users\moon2>
- Assistant
The error message suggests that the module 'sklearn' is not installed in your Python environment.
To fix this issue, you can try installing 'sklearn' using the following command:
shellpip install scikit-learnMake sure you have an active internet connection and that pip is installed and up-to-date. After running the installation command, try running your code again and see if the error persists.
- User