Problms of Anaconda with Different versions of numpy - python

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.

Related

ModuleNotFoundError while Requirement already satisfied

I am losing my mind over this. could someone please help me understand what needs to be done in order for me to import external libraries properly? I have deleted all other versions of python. I don't know what to do. Thank you.
uninstall any python version on your system.
go to python.org and download a version of python that suits you (preferably 64 bit if your system can handle it).
in the end of the installation make sure you tick the "add python to PATH" to allow programs to find it.
make sure you link it to the Vscode properly, this page has some details
basically your python points to your msys installation and your pip3 points to an old installation of some version of python ... installing a new version of python and adding it to path should fix it, but you might want to manually remove those old versions so they won't bother you in the future.

Where does opencv come from in spyder

I'm working on a project where i use Spyder-IDE from anaconda. I just need to download certain opencv version. Therefore i uninstalled my current openCV version from anaconda environment (see image below):
However, the opencv which i assumingly uninstalled Bibliothek is still being imported in spyder (see image)
As you see above the library still being imported
I also checked if its installed using pip but didn't find anything
So where does it come from and how to emove it?
Thanks in advance
So where does it come from
To find that out, you need to write
cv2.__file__
how to remove it?
It depends. If that file name contains directory names related to Anaconda on it, you should use conda to do that. If it contains AppData and Python37 or Python38, you need to go to that location and remove that directory by hand.

Installing matplotlib and numpy without pip

I'm running python 3.7 and idle.
I can't use pip because of the firewall at work (I think).
I tried following these instructions:
How to manually install a pypi module without pip/easy_install?
When I try to install matplotlib it looks for numpy, so I assume it's a prerequisite. numpy looks for VS c++ 14.0, so I assume that is also a prerequisite. Are my assumptions right?
Installing VS may be a pain due to hard drive space. I want to make sure I don't do it for nothing.
When I download and unzip the installation folders where is a good place to save them to make life easier? I have a 'python37' folder in c drive and I created a new folder there. Is there somewhere better for referencing?
Please be as explicit as possible in your answers, all of this is new to me.
If you have ability to download and install on your computer, I would recommend just installing/using the Anaconda distribution of Python, which has almost everything you need rolled in (including matplotlib and numpy) with the basics.
https://www.anaconda.com
Turns out the work around is to set a proxy in . I have no idea where the proxy came from and why and how it works but it worked.
I'd still be interested to get answers to my questions though, as someone else might be having similar issues or needing to install downloaded modules on machines which aren't connected to the internet (the latter being very likely for me in the near future).
So to be clear I'm not asking what distribution to use or for other locations to download wheels files. I need to know how to install without using pip on a machine which is not connected to the internet.
apt install python3-numpy
i Guess this will work
Try downloading the packages from https://www.lfd.uci.edu/~gohlke/pythonlibs/ and install them using
pip install name_package.whl

pip.exe has stopped working

I know this question has been asked a few times before, but none of the answers I've read have managed to solve my problem.
When I try to run any of the following, I get an error saying "pip.exe has stopped working:
easy_install
pip
pip3
It was working for me previously (the last time I used it was probably a month ago), but not anymore. I'm using Python 3.4.4, I checked the PATH and it's configured correctly. Does anyone know what else might be causing the issue?
I had the same problem before and the solution is quite simple.
First try updating pip via command:
pip install --upgrade pip
If that doesn't work try uninstalling current version of python and reinstalling the newest version.
Note1: Do not just delete install files and files in your C drive ,uninstall everything packages, everything that might cause problems, especially delete old python packages and extensions they might not work with the newest python version and that might be the problem. You can see in python website which packages and extensions are supported.
Note2: Do not and I repeat DO NOT install .msi or .exe extensions they don't work anymore always use .whl (wheel) files. If you have one .msi or .exe uninstall them form your system completely; that also means that you have to uninstall them from command prompt.
Note3: Always check if the .whl is compatible with your Python version.
Note4: Also don't forget to save your projects before doing anything.
Hope that works :D
Happy Coding.

Problems in fully uninstalling Python 2.7 from Windows 7

some months ago, I installed Python 2.7 on my laptop (my os is Windows 7).
After, I decided to use Python xy 2.7.3 instead of 'pure' Python; so, as suggested, I removed Python 2.7 and tried to install Python xy 2.7.3. However, when I tried to run the .exe file for installation, a warning window appears telling me that Python 2.7 is already installed on my computer. I tried to install a different version of Python xy (2.6) and everything went fine; however, I'd really prefer to use the latest version of Python xy.
Actually, I can't figure out what went wrong whie uninstalling Python 2.7; does someone have any clue?
I can tell you that I followed the 'normal' procedure for programm uninstalltion; control panel -> Programs -> Remove Program
Thanks in advance
Stefano
Run regedit, backup and delete the registry keys:
HKEY_LOCAL_MACHINE\Software\Python\
HKEY_CURRENT_USER\Software\Python
My problem occurred when changing from Canopy to Python(x,y).
So, also delete all folders that are left behind when uninstalling.
https://support.enthought.com/entries/23580651-Uninstalling-Canopy
I also had this issue as well. It was due to third party installs. Even though you have uninstalled python, it leaves all the third party libraries that were installed and I think Python(x,y) just detects the directory.
To fix, uninstall Python 2.7 and then check to see if C:\Python27 still exists. If it does, go ahead and delete and then try installing Python(x,y). That is what worked for me.
I faced this issue: I tried to uninstall the python and fresh install, reason my pip version issue was not getting resolved. So I deleted the python folder, removed python from system path, and when I tried to uninstall from "Uninstall a program" in control panel, it showed "Windows installation package" error window and could not clean uninstall.
Solution what i found was: In the "Uninstall a program" select python and click repair. And then uninstall the python, it worked for me. Hope this helps and save some time.
PS: I am pretty new to python, and any help correcting me would be appreciated.
Maybe to put an answer out there.
Uninstalling anything from windows can have multiple side effects residing completly on your specific machine. As to what is common:
-> Python sets itself in your windows path. Here is how to modify your windows path: http://www.computerhope.com/issues/ch000549.htm
It means that there is a probability that python is gone but the path entry might not be. That is a guess however -> more information needed
-> Are you sure that everything was removed from your computer? If you already did the normal uninstalling process - try to look up if any python directory is still present.
-> Thirdparty installed? Have you downloaded any libs that are still on your machine.
Besides from that - it could be anything - the more information you give us the more we can say about it.
Maybe this post will help you: How to completely remove Python from a Windows machine?
I had python 2.7.12 and wanted to uninstall it for 2.7.9. I had the same problem as you and to fix it I tried to delete all of the local files and then uninstall however it still gave me the same error. So instead I decided to repair the python 2.7.12 and then uninstall which worked perfectly and completely got rid of the error.
I had python 2.7 installed and enthought canopy. I wanted to switch to python(x,y) to access a full version of the OpenCV library. python(x,y) installation complained about python 2.7 already being installed after:
1)Using windows control panel
2)Removing all lingering python files
3)Removing the windows path as suggested above
Not until I removed all registry entries related to python/enthough did python(x,y) install without issue.
I installed Enthought before. When I wanted to install Python(x,y) instead, I met the problems above.
After I had tried to uninstall Enthought and Python(x,y) from the Control Panel and then restart the PC, the problem still occured the next time I installed Python(x,y).
I solved this problem by:
deleting all the relevant files in C:/User/UserName/AppData/ about Python, including the third party softwares like Enthought;
deleting the Path in user and system Environment;
=====the two steps were failed if I didn't do the third step.=====
deleting the register keys as #Daniel said. (include all the relevant keys with the prefix py if you installed the third party software about Python. )
HKEY_LOCAL_MACHINE\Software\Python\
HKEY_CURRENT_USER\Software\Python
Locate that set up file which was used to install Python. Run it and choose repair. If that doesn't solve the problem. Go to c:\Python(x,y) and delete this folder completely by shift+Del.
Run that set up file again and click on "Change" which will ultimately install the Python again. By default in my case option to add path and making that version of Python the default on my system was unchecked which can be figured out by seeing the red cross mark in one of the installation screen. Click on it if you want set up to make it default Python version and also click on the option to indicate you want the path to be added in windows environment variable.
No need to touch registry as previous ones will be overwritten again.
In my case it worked. I was getting error like:
Fatal Python error: Py_Initialize: unable to load the file system codec
LookupError: no codec search functions registered: can't find encoding
Besides that un-installation was failing from control panel. So above steps solved all of my problem. Hope it helps.
I Repaired/Modified to install all the components for the Python
version I wanted to uninstall.
Once that was done, I clicked on Uninstall/Change and that uninstalled it for good.

Categories