I installed anaconda and started working on jupyter notebook.
When i try and import sklearn i get the error shown in the image (note that i didn't had any problems importing other packages).
I've done a bit of research online and from my understanding i believe the issue exists because i already have sklearn installed on Python and there's a possible conflict.
If that's the case i don't know what to do since i already use sklearn on another project and i cannot uninstall it.
Anyone know how i can solve this issue?
Thanks in advance!
As you can see from the traceback, there are two python environments involved here:
~\AppData\roaming\python\Python37
~\anaconda3
Please make sure your PATH is clean and you can actually remove one of them first.
For anyone that might face the same issue, check your Anaconda and Python.
I had Anaconda on 64-bit and i didn't knew that by default Python is downloaded on 32-bit.
After uninstalling and installing Anaconda to 32-bit everything worked fine
Related
I'm so sorry to bother you with my stupid question. Due to my mismanagement of the anaconda installation package location, I may have used pip and conda to install numpy many times.
But now, after I manually corrected the installation location, numpy1.20.3 was correctly installed in E:\Anaconda\Lib\ site-packages\numpy. It seems that the problem has been solved, but when I opened the Anaconda pkg folder, I found a lot of files related to the 1.15 version of numpy.
I am very curious and want to know whether I can delete these files manually, and only keep the 1.20 version of numpy? I also want to know how these files are generated, are they the undeleted files left when I uninstalled the old version of numpy with conda or pip before?
Hope you won't be bothered by my stupidity.I would be very grateful if you could share some understanding on these issues!
enter image description here
enter image description here
I looked over your problem and it's safe to say that, you can manually delete all the files of the older version of your Numpy (1.15).
Those files are kept by your machine by default, in case you re-install the
particular version for everything to function and works properly.
It had happened to me too, in my case, it was some other module but the same problem.
This is a very vague question but I am really stuck. I have been working with python for a little bit to try and use some of their functions in opencv (cv2) and other open source libraries. But whenever I try and use pip I will always get an error about improper installation or more commonly when trying to import the installed package idle throws an error that a line of code in the library that is causing an exception. This does not just happen to one library but nearly all of them (I have tried stuff like opencv, tensorflow, urllib). I have tried reinstalling different versions of python (multiple times) and reinstalling it but none of that seems to work. I don't know what to do but really want to be able to use these tools. I use windows 10 and use the default "User" user on admin.
Any help on possible options would be most appreciated!
This was happening to me as well.
In my case I wanted to work with Anaconda and Spyder. I was following some books and tutorials saying how to install stuff with the pip and so on, but it didn't work. What solved it was to install PyCharm and use those same pip functions directly on the PyCharm console (not the windows cmd). Then everything worked automatically and I have whatever library I installed from PyCharm available at Spyder without doing anything else.
Summary:
Get Pycharm -> link
use the same pip install directly in the PyCharm console
A-Hopefully it will work
If it doesn't: Can you elaborate on which IDE are you using? Most likely there is someone here who can help you.
I am trying to import pandas in a Jupyter notebook and having trouble because it's using an old version of numpy. I believe I've traced the issue to the fact that I have two versions installed:
Version 1.8.0rcl is in:
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Version 1.13.3 is in:
/Users/<username>/Library/Python/2.7/lib/python/site-packages
When I run the python interpreter from the command line, it imports the newer version, but when I run a jupyter notebook, it imports the older version. I've checked the sys.path using both methods, and they are the same. This further confuses me because in sys.path the directory for the newer version comes BEFORE the directory for the older version. Based on how I thought sys.path works, that would mean jupyter notebook should be importing numpy from the directory with the newer version in it.
I found another question where someone ended up just renaming the directory with the old version in it, but I'd rather not do that (and also am not sure I have permission to do that anyway).
Can anyone help explain what is going on here, and suggest some solutions?
Please read this long post from Jake Van der Plas describing how importing works and why you think Jupyter is using the wrong numpy.
Once you get how things works, you should be able to fix it following the instructions in Jake's post.
I'm struggling with Anaconda Python distribution. I installed it first months ago, but now I need to use TensorFlow which is not officially supported (and updated) within the Anaconda distribution.
I installed then a new Python distribution (Python-3.5) and tried to use it, instead of Anaconda, to run the above mentioned library. I have some issues though 'cause the Conda has set as default Python distribution its own one.
I saw in this discussion Using two different python distributions that my goal could be achieved by setting an alias like 'pyconda='/path/to/your/anaconda/bin/python'' in my .bash_profile file.
The problem is that I have no such a file under my home (and I tried to insert a brand new one and run simple aliases like 'alias cd="cd /c"' to see if it could work but it does not).
Could someone please give me an hint?
Thx in advance to all of you!
For Anaconda, my best suggestion, if not already tried, would be to use their graphical installer.
For TensorFlow installation, I would recommend using Pip
Hope this helps !
I am running into an Anaconda bug described in this Github issue: https://github.com/conda/conda/issues/2965
The reporter indicates that if we makes some changes to Anaconda, he can fix the problem. I have installed Anaconda on my Max (OS X 10.11.6), and I am having the trouble reported by this issue while following instructions to install TensorFlow. I'm wondering whether someone can tell me how to find and modify my Conda installation to test out the proposed bug fix listed in the issue? Also are there files I can simply modify or will I need to recompile or reinstall after? I am a newbie to this sort of thing, so any advice would be appreciated.