I use windows 7 and I've had problems with viruses. Using eset nod 32 and malwarebite anti-malware I've managed to clean everything up. But now I can't open Python (neither Spyder nor ipython notebook...). Nod 32 tells me that there are some files that are damaged and can not be open in anaconda.
I've tried uninstalling and reinstalling python, and googling my issue hasn't turned up anything. Has anyone else had this problem?
Remove previous installation of python, download the latest, install and attempt to launch python again.
https://www.python.org/downloads/
It could be that your anti-virus is false-identifying some python files as malicious, or perhaps you aren't installing python as administrator.
Perhaps python isn't on your path.
What happens when you open up your cmd.exe or powershell.exe program and run
python
How did you uninstall python? By deleting the folder? Don't do that, there may be other data from it on your computer. Instead, go to add or remove programs and uninstall it from there (may be slightly different on Windows 7 beecause I am using 8.1)
Now, with your viruses, I would suggest that you take a hard drive and save the folders that you KNOW do not have viruses. This means folders that you made yourself, not ones that another application made for you. Back them up, then restore your computer to factory settings. This should erase all the viruses.
Related
I was trying to install a SQL-Python connector and kept receiving an error that it could not find the python installation. It said that it only accepted the version used by the installer from the python website so I downloaded that and tried to install it in the same path where my python was (C:\Python38) but then saw that it was installing a 32-bit version of python there so I cancelled the install mid-install (this was a mistake). I think I did that at the wrong time because now the folder still exists but it had deleted some parts of my python installation. So now I'm in a weird place where I can't install python (When I open the 64-bit installer it only gives me the option to Modify, Repair or Uninstall, and all of those shoot up errors where it says that it can't find the python installation). The 32-bit version does allow me to try and install but I get an error saying "The File 'python.dll' cannot be installed because the file cannot be found in cabinet file 'cab1.cab.'"
If I try and uninstall python from the Windows uninstaller I also get errors that there is no python version to install.
I tried just deleting the folder from my system but that doesn't work either. Not sure how to bring my computer back to a state where I can do a fresh python install. Is there any way?
What I did, and I am not sure that it was the cause of solving the problem, was to delete the 'python.exe' and 'python3.exe' files that where in 'C:\Users\Usuario\AppData\Local\Microsoft\WindowsApps'. As the user don't have access to delete them from the files explorer, I entered from cmd as administrator and deleted them with the 'del' command.
Again I am not sure if that was the cause but I think it worked for me while I was trying to delete all python related files to reinstall.
I am new to python. I am installing Anaconda 3 2020.02 (64-bit) on my windows 7 laptop. It get stuck at file name as anaconda-2020.02-py37_tar.bz2
I tried multiple time but it's happening everytime
I met the same problem. I tried to install an previous version of anaconda from
https://repo.anaconda.com/archive/
It downloaded and installed "Anaconda3-2019.10-Windows-x86_64.exe" and it works.
I just did it. It does not get stuck, it just takes a veeeeery long time to extract (like 10-15 mins). the final size of the Anaconda folder is 5.4 GB, that is probably the reason why.
I had this issue for a while and just tried #wizu recommendation. It worked. I was able to install Anaconda3 2019.10 successfully. I think this is specifically a issue with the 2020.02 release.
I had faced the same issue as well on my Windows 10 desktop. All I see is lots of idle conda processes in Task Manager and the installer stuck on anaconda-2020.02-py37_0.tar.bz2. Extracting the anaconda-2020.02-py37_0.tar.bz2 file with 7zip while the installer was stuck did not help.
I solved the problem by running the installer on a separate Windows 10 machine which does not have trouble running the installer. I then moved the Anaconda3 installation folder to my problematic machine.
Now this does not normally work and anaconda highly recommends installing by running the installer instead of transplanting the folder. But we can hack it to work (as far as I have tested) by doing the following:
1) Using a program, search through every text file (.cmake, .txt, .sh, ..py, .pc, .prl, .conf) for string instances of the old full path to Anaconda3 on the original installation directory and replace them with the full path to the new Anaconda3 installation directory.
Some paths may use double backslash \\, single backslash \, forward slash /
or even a mix of them. Be careful to handle all these cases.
2) Some numpy related text files may contain paths to C:\Program Files(x86)\IntelSWTools\compilers_and_libraries_2020.X.XXX\.... Be sure to change this path to the available intel accelerated libraries on the new machine.
Additionally, copy over the start menu program shortcuts (found in C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Anaconda3(64 bit)) to the same location on the new machine. Right click on each shortcut file to change the target path.
If the transplanting worked, on the problematic machine you should be able to launch Anaconda prompt from the Start Menu, launch spyder, and subsequently run numpy functions.
This is a hackish solution. But until we can find the root cause of the installation issue this is the only way I can install Anaconda-2020.02. I am waiting to see if there are better ways to fix this problem.
I'm running Windows 10 Home, and I recently downloaded Anaconda because I wanted to be able to use Spyder, and wasn't really anticipating how much storage space it would take up, so I had to uninstall it.
However, my computer has two hard drives--a 100gb C:/ drive that windows boots off of and a much larger D:/ drive meant for storage. A lot of anaconda's largest files seem to be saved to C:/Users/[User], which is still on my C drive. And taking up space that I don't really have to spare.
Is there a way to tell Anaconda during installation (or initial run, possibly, it looks like) that it should save those files somewhere else? One of the environment variables, maybe?
If not I guess I'm open to suggestions for other Python IDEs that are smaller or can be put entirely on a secondary drive.
If you only want to work with spyder and not the rest of the software that comes bundled with Anaconda, you can just
pip install PyQt5
pip install spyder
Here is a guide for installing Spyder.
I have recently been learning Python 3. I have had no problems on my netbook (32bit Windows 7) I with creating small simple programs. When I installed it on my netbook I had no problems, but now that I've been getting into it I want to install it on my desktop and I have one.
My desktop is a 64 bit OS running Windows 7. Like I did with my netbook, I went to download Python and install the 64 bit edition.
After installing it, I went to open up Python CLI and GUI and no luck. It gave me this error.
"The application was unable to start correctly (0xc000007b). Click OK to close the application"
I also tried reinstalling, but not luck.
I suspect a missing .dll but I am not completely sure. Does anyone know what is keeping me from opening Python and how do I fix it?. I want to resume my work as soon as possible.
That is the NTSTATUS error code for STATUS_INVALID_IMAGE_FORMAT. Almost invariably that means that the loaded is attempting to link a 32 bit DLL into a 64 bit process, or vice versa.
If you want to attempt to debug this then the tool of choice is Dependency Walker. You open the python.exe executable file in Dependency Walker and use the profile menu to start it up with logging of the load events. Somewhere along the way there will be a failure and you'll be able to see which module is causing that failure. That will hopefully point the way towards a resolution.
However, attempting to debug this may be a waste of time. It will probably better to uninstall the existing installation, and try to re-install. Perhaps picking a different Python distribution.
I note that you have selected a 64 bit version. Now, support for 64 bit extension modules is not as strong on 64 bit Python as on 32 bit Python. It does exist, but they modules can be harder to come by and install. You might consider installing a 32 bit Python next time round.
Please make sure that Python3.dll is the same version and the same architecture (32/64) with python.exe. I fixed this error via replacing it with 32bit version.
you should delete the old path of python in "Environment Variables" and enjoy ;)
As janne-karila mentioned, and for Python 3.5, Microsoft Visual Studio 2015 redistributable (in this case the 64 bit version)
This probably won't answer your question, but my answer is for a very specific case when you "Refresh Windows without affecting Files" to fix your Windows 8.1 PC.
If you do that, You'd get this error when you try to run Python after the windows refresh.
To fix this error, simply re-install PY at the same folder where your python was install before you refreshed windows. If you try to install it any other folder like username/appdata/... folder the PY installer would be stuck in initialization.
You may also get another error saying "api-ms-win-crt-runtime-l1-1-0.dll is missing". To fix, go to the windows.old folder and get the dll file ith the above name and paste it in the PY folder. Also like others have suggested, make sure Microsoft Visual Studio 2015 redistributable is installed.
Encountering this error after a windows refresh is so rare, that no one else seemed to have experienced according to google searches, so I though I share it here for that rare unlucky person.
Apparently the error code stands for STATUS_INVALID_IMAGE_FORMAT (source), and it looks like it's not specific to Python. You can try reinstalling the program, rebooting, running CHKDSK /r (source). It might also have something to do with the Microsoft Visual C++ redistributable package, as Janne Karila and this thread suggest.
This stackoverflow question also looks like it has some useful information.
I too faced this problem. So I uninstalled python3 64-bit version and installed 32-bit version, after that i am able to launch python3 in windows 8 successfully. (i have a 64-bit laptop).
Simply, download the last version of Microsoft Visual C++ redistributable package ..
I had the same problem ..
I have the same error found. Using dependency walker, I found tons of DLLs missing. Rather going for copying all the DLLs I went with virtual environment. It will create another environment for Python.
First, install python normally. Copy, the Python.exe path. In my case, it is
C:\Python\python
It will be used to install Python libraries. Then, using command prompt, I used pip to download and install virtualenv (Virtual environment). To do that, change the directory to where pip.exe is, which is in Scripts folder. Now, run the following to install virtualenv:
C:\Python\python pip install virtualenv
It will install Virtual environment.
Now, create a folder to hold virtual environment and change directory to that folder and run to create the following to create an environment:
virtualenv --no-site-packages [environment name]
It will create the Environment.
Now, change subdirectory to Scripts in the [environment name] folder. There is a activate file run it, in my case it is like:
C:\Python\virtualenv\env\Scripts activate
env is the [environment name] here.
If you activate it, every command will look like:
(env) C:\Python\python
This ends here. Now, you can install any python library using this. Do whatever, you want using Python.
Also, to deactivate the environment same deactivate.bat is in the scripts folder.
For me the issue was, I had installed 32 bit version on a 64 bit machine. Hope it helps someone out there.
Like many have said, Windows cannot load python.exe itself or one of its dependent DLLs because of INVALID_IMAGE_FORMAT:
python.exe is of unsupported bitness. 32bit on 64bit Windows is supported. 64bit on 32bit system is not (solution: install 32bit python, bye).
python.exe or one of its DLLs is corrupted (probably not)
one of the dependent DLLs is not of the same bitness as the EXE:
python.exe (say, 32bit) requires python*.dll (python3.dll or python27.dll). It installs that into Windows System32/SysWOW64 folder. The DLL is of correct bitness (32bit).
Something else overwrites that with 64-bit version, or places a 64-bit version somewhere in the search PATH.
When you run python.exe (32bit), Windows searches for python*.dll, and the first one it founds is the 64bit one. 32bit EXEs cannot normally load 64bit DLLs.
Typical examples:
TortoiseHg installs its own copy of python (both .exe and .dll) into its own folder and adds itself to PATH. The bitness can be different (say, 64bit) and usually matches platform bitness.
Another installation of Python with a different bitness somewhere else overwrites the DLL (it shouldn't, they have different System32s, but who knows)
Diagnostics:
Dependency Walker marks 64bit DLLs with 64bit icons. Verify that icons for python.exe and python*.dll match. Right click -> "Show full paths" to see where the DLL is taken from.
Simple solutions:
Maybe you have another, functioning copy of Python somewhere else? Check it.
Reinstall Python, preferably in the platform version (64bit for 64bit OS, 32bit for 32bit) Yeah, that's what many are saying, but now you know why this is needed.
Remove offenders from PATH. While this maaaay fix your Python, this will break the offenders and some (TortoiseHg explorer plugins) need the PATH. So maybe compromise with them and choose #2.
In my case I was installing both the 32 and 64 bit versions of the python msi. They both install to the same folder, c:\python32. I thought msi's would prevent those kinds of conflicts, but no.
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.