Upgrading python from 32 bit to 64 bit messed up pip (Windows) - python

I upgraded python from 32-bit version to the 64-bit one, I did this by uninstalling python using add or remove programs and installing a new one from the official installer. While doing so, I also upgraded it from python 3.6 to 3.7.
Now when I try running pip I get the following error
The code execution cannot proceed because python36.dll was not found. Reinstalling the program may fix this problem.
It didn't.
python -m pip works for me but I would still like to fix the original functionality.

This happened with me too and I didn't get any solution to it. But when I installed Python 3.7 then I did not face any problem. And the pip too was working.
Maybe there was an error in the bindings of Python 3.6.

Related

Modules installed but not found by Python in Raspberry Pi 3

I have a Raspberry Pi 3 with Raspbian and I upgraded python version from 3.7 to 3.8. If I type python --version in the terminal the correct version appears as the system version. However none of the modules that I have installed AFTER the version change seem to work. Python gives ModuleNotFoundError when trying to import ANY of the modules that I have installed.
I can see the modules with pip freeze but Python seems to not be able to find them.
I followed this instructions to purge 3.7. I reinstalled pip after purging python 3.7 but pip as again installed in /home/pi/.local/lib/python3.7/site-packages/pip. How can I get rid of 3.7 completely?
python3.8 -m pip install SomePackage # specifically Python 3.8 should work.
More documentation here: https://docs.python.org/3/installing/index.html#work-with-multiple-versions-of-python-installed-in-parallel
Just to summarize the comments and suggestions from other answers:
The problem I have was caused by the fact that even I had set Python 3.8 as default and python -v was pointing to Python 3.8 the pip script was installing modules for Python 3.7.
The suggested solution was to use pip3.8 (or whatever version someone might have) to install packages for that equivalent Python version and that works good.
Ideally best option if someone wants to have multiple versions of python is to use pyenv. You can create multiple virtual environments with multiple python versions.
However Do not uninstall the default Python. I have also tried to uninstall the default Python 3.7 to avoid having two versions of python 3 and keeping track of which module is installed where. This was a bad idea. I did not know that many Linux distributions have applications which use the default Python. You might get a black screen and who knows what other problems see this discussion Removed Python 3 on 18.04, how can I fix my system?

Installing opencv for Python

I have both Python 3.7 and 2.7 installed currently, and have a simple image processing script that calls for opencv. However, I keep getting the "module not found" error. I've tried using pip install, pip3 install, and installing the Windows executable from the opencv website, none of which have fixed the problem. The script won't run from either 3.7 or 2.7! I'm currently trying to use Visual Studio Code on a Windows 10 Surface computer.
Other threads seem to suggest that I need to update the Python registry/pointer or something to reflect the actual install location, but I can't seem to find how to do this. Or can I simply copy/paste the directory or files into Python directly? (Python 3.7 is preferred, or for both if possible!)
Edit: After uninstalling and reinstalling both Python 2.7 and 3.7, I think I figured out what the problem was! I was still having issues upon reinstall, so I tried rolling back a version to 3.6. During this installation, I noticed that even pip wasn't working anymore. It was at this point I realized that somehow my installation of Python was done with administrative privileges by default. Even though my account is the only one running on my personal computer, I still had to install pip with elevated privileges to get it to work. Now it seems like OpenCV and other modules are working!

How to use Gcovr Installed with pip on windows

So I followed this guide and managed to install Gcovr using pip (I already have Python installed along with Anaconda). I tried to use gcovr but this is what I got:
When I use pip list, Gcovr is already installed.
How do I use it?
I'm running Windows 7 64bit with Python 3.5.2 :: Anaconda 4.2.0 64bit
P.S:
I'm sorry if this has already been asked before but after searching around for days I've yet to found any solution to my problem.
Using gcovr 3.x is a bit more cumbersome on Windows because Windows doesn't seem to recognize the gcovr script as an executable. Instead: find out where gcovr was installed to (e.g. by running pip in --verbose mode), then explicitly invoke Python:
> python C:\path\to\gcovr
The path is probably something like C:\Python35\Scripts.
You can also write a batch file to wrap gcovr like this.
Please also consider updating (pip install -U gcovr), as gcovr 3.4 fixes some other bugs on Windows.
This installation issue will be fixed in the next release. If you want to, you can already install the development version directly from GitHub:
> pip install git+https://github.com/gcovr/gcovr.git

Install Python 2.7.* in Windows 10

I am using Windows 10. Just now, have installed Python 3.5 64 bit successfully. However, when I want to install Python 2.7.*, the following error is shown.
I even uninstalled Python 3.5, but no luck. Anyone know how to fix this?
OK. I solved the problem by installing a 32-bit version.

How can I fix my python installation?

For some work I'm doing at my office I needed to downgrade my python version from 2.7.9 (OS X default installation) to 2.7.6. It seemed the easiest way to do this would be to uninstall python and then reinstall the older version. After following the instructions here and then running the official Python 2.7.6 installer. I then tried to just run python in the terminal to make sure the installation worked and received this error:
-bash: /usr/local/Cellar/python/2.7.9/bin/python: No such file or directory
Running python --version gave the same results. which python yielded the following directory:
/usr/local/bin/python
Does anyone have any idea how I can fix this issue to get the right version of Python running? I'm pretty much out of ideas at this point.
The symlink in/usr/local/bin/Python is still pointing to the other version. Update it to point to the version currently installed and it should work.

Categories

Resources