yfprojects, I figured out what I did and how to fix it.
First, I installed anaconda. From the anaconda browser I installed and launched spyder. When I launched, I got a message that 5.0 was available. I was excited to get the latest version. So I went to the main spyder page got the latest and installed it. I merrily went along with my new spyder 5 for a while, not noticing my mistake, until I tried to import scikit-learn. Fixing my mess was not too hard. In Windows I uninstalled spyder 5. Then I went back to the anaconda prompt and installed it there, and I was back in business. Thank you again - I would not have figured it out if you had not suggested going to the anaconda environment! DeTermined On Wednesday, May 19, 2021 at 11:01:56 PM UTC-7 yfprojects wrote: > Hi DeTermined, > > another person posted a similar issue here in the group > <https://groups.google.com/g/spyderlib/c/F7mND9O1KDE>. I actually don't > know what the problem is, but it seems to related to spyder. You could try > to type in the import manually into the qtconsole which is the backend of > spyders console. You can start it with `jupyter qtconsole` in the anaconda > prompt. > > It would also be great if you opened a Issue for spyder's repository on > github <https://github.com/spyder-ide/spyder/issues>. > > Kind regards > yfprojects > > DeTermined schrieb am Mittwoch, 19. Mai 2021 um 17:39:25 UTC: > >> yfprojects, >> >> I think I understand where you are going. The anaconda prompt has a >> sys.path that includes anaconda3\\lib\\site-packages, where the >> scikit-learn package is. In spyder the sys.path does not include the >> anaconda\\lib\\site-packages. In Sypder if I add the missing folders to >> sys.path, spyder does get further. With the updated sys.path, the error in >> sypder is "ImportError: No module name 'sklearn.__check_build._check_build'" >> >> Thanks for the response, >> DeTermined >> On Wednesday, May 19, 2021 at 9:03:01 AM UTC-7 DeTermined wrote: >> >>> On an anaconda command prompt, I get this: >>> >>> (base) C:\Users\daton>python -c "import sklearn; sklearn.show_versions()" >>> >>> System: >>> python: 3.8.5 (default, Sep 3 2020, 21:29:08) [MSC v.1916 64 bit >>> (AMD64)] >>> executable: C:\Users\daton\anaconda3\python.exe >>> machine: Windows-10-10.0.19041-SP0 >>> >>> Python dependencies: >>> pip: 21.0.1 >>> setuptools: 52.0.0.post20210125 >>> sklearn: 0.24.1 >>> numpy: 1.20.2 >>> scipy: 1.6.2 >>> Cython: 0.29.23 >>> pandas: 1.2.4 >>> matplotlib: 3.3.4 >>> joblib: 1.0.1 >>> threadpoolctl: 2.1.0 >>> >>> Built with OpenMP: True >>> On Tuesday, May 18, 2021 at 11:19:41 PM UTC-7 yfprojects wrote: >>> >>>> Hello, >>>> >>>> does the following command work in the anaconda environment you >>>> installed `scikit-learn` in? >>>> >>>> >>>> - python -c "import sklearn; sklearn.show_versions()" >>>> >>>> Kind regards >>>> yfprojects >>>> >>>> DeTermined schrieb am Dienstag, 18. Mai 2021 um 20:20:51 UTC: >>>> >>>>> I am trying to use scikit-learn within spyder. I am using spyder >>>>> 5.0.3 and anaconda 4.10.1. I installed scikit-learn on an anaconda >>>>> prompt >>>>> with the following command: >>>>> >>>>> conda install -c intel scikit-learn >>>>> >>>>> I got this command from the scikit documentation. Anaconda shows that >>>>> version 0.24.1 of scikit-learn is installed. >>>>> >>>>> In spyder the following command: >>>>> >>>>> from sklearn.preprocessing import MinMaxScaler >>>>> >>>>> gives me "No module named 'sklearn'". What is wrong? >>>>> >>>>> -- You received this message because you are subscribed to the Google Groups "spyder" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/spyderlib/4bc719ab-652a-402e-a7c9-e7a76c3b37f2n%40googlegroups.com.
