Python wheel not supported on this plattform - python

I tried to install the mysqlclient-module for python 3.8. I ran into several problems while doing so that are described in other posts. I then tried to install it on another pc where it worked. On the first one it downloaded the mysql.tar.gz file and tried to build the file by itself(failed due to another error). But on the other pc it instead downloaded the 1.4.6-cp38-cp38-win_amd64.whl file and installed it correctly. Both machines run Windows 10 and when running platform.architecture() i receive the same result on both. I even tried installing the wheel manually on the first machine where i got the "not supported wheel on this plattform". The only difference i found in the systemversions is the build which is 17763 on the one it worked and 18363 on the one it didnt work (although i believe this shouldnt be the source)

After trying around a bit i realized this error only occurs while beeing in the virtual enviroment in pycharm on the first machine. I was able to install it outside of the virtual enviroment and then copy the created files manually to the virtual enviroment.

Related

Weird Python Log Error while trying to reinstall Python on Windows 11

I installed Python on Windows 11 normally after getting the setup from python.org but, by mistake, I deleted the partition Python was installed in (it was E drive). So now, when I rerun the setup, it shows that Python is already installed.
I forced uninstall the old Python and removed all the registery keys with the help of Revo Uninstaller, but now, when I try to install Python again, it isn't installed to the specified folder and when I try to Uninstall the same via setup (after installing), this is the error I come across: https://paste.pythondiscord.com/tekopijiju
So now I want to know if there's a way to force install that Python version?
This issue has been fixed.
The Fix: I reproduced the path (The E drive) I had deleted and added the same Python folder to it and then clicked the Repair button. It automatically installed Python back to that folder and then I was able to normally uninstall it and install at another location!

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!

Why are different libraries searched for in tensorflow, even though both were installed the same way?

I built tensorflow from source and got a *.whl file that I could install on my pc with pip install *.whl. Now in the virtualenv where I installed it I can open python and do import tensorflow without a problem and also use tf. Now I tried to install this same wheel on an other pc in a virtualenv and it worked successfully, but when I try to use import tensorflow in python I get:
ImportError: libnvidia-fatbinaryloader.so.390.48: cannot open shared object file: No such file or directory
Now I actually do not have that file on the other pc, but after checking my own pc I also don't have it here. I have on both pcs libnvidia-fatbinaryloader.so.390.87. On both pcs the LD_LIBRARY_PATH points to the directory with that version.
How can it be that tensorflow searches for version 48 on the remote pc while searching for 87 and finding it on my pc, even though they are both installed with the same whl file? Is there a config that I need to adjust what version it should search for?
I would say you have a broken CUDA installation somewhere in the library path. It is libcuda.so that has a dependency on libnvidia-fatbinaryloader.so, so maybe the symbolic links point to a library that no longer exists but was installed before.
You can find this information by running the ldd command on the libcuda.so file.
The building process is related to the computer environment.Could building tensorflow in the same machine and installing it on the same machine help?Building on one machine and generating the *.whl,but installing on other machines may cause problem.

Anaconda installation problems - how to uninstall Anaconda (Windows)

I recently tried installing Anaconda for my Windows 10 laptop. Unfortunately, this didn't seem to work, as there seems to be no actual Anaconda application on my computer, rather just a collection of folders and files on my desktop. I think this problem can be attributed to me downloading the 32-bit version of Anaconda while my OS is 64-bit, though I am not sure this was the problem. Regardless, I would now like to uninstall Anaconda from my computer. How would I go about uninstalling Anaconda from Windows despite Anaconda not fully downloading and only consisting of various folders on my desktop. I'm not super computer-savvy so typing in commands directly into the console seems a bit intimidating.
Because the program isn't actually installed, you can honestly just throw all of the files needed TO install Anaconda into your trash or recycle bin. If you go to "Programs and Features" and you don't see Anaconda, then those other files and folders can just be thrown away.
There also is a
Uninstall-Anaconda.exe
directly in your Anaconda folder. But I'm not sure if it does something more than just deleting the folder/files.

How can I use pywin32 with a virtualenv without having to include the host environment's site-packages folder?

I'm working with PyInstaller under Python 2.6, which is only partially supported due to the mess MS have created with their manifest nonense which now affects Python since it is now MSVC8 compiled.
The problem is that the manifest embedding support relies on the pywin32 extensions in order to build which is a pain because without including the host's site-packages folder when I create the virtualenv (kinda defeats the point in a build environment) I cannot find a way to install the required extensions so they are accessible to PyInstaller.
Has anyone found a solution to this issue?
I found http://old.nabble.com/Windows:-virtualenv-and-pywin32--td27658201.html (now a dead link) which offered the following solution:
Browse http://sourceforge.net/projects/pywin32/files/ for the URL of the exe you want
Activate your virtualenv
Run easy_install http://PATH.TO/EXE/DOWNLOAD
This works with modern versions of setuptools (circa February 2014, reported by tovmeod in the comments).
If you are using an old version of setuptools (or distribute it merged back into setuptools), you may get this error message:
error: c:\users\blah\appdata\local\temp\easy_install-ibkzv7\pywin32-214.win32-py2.6.exe is not a valid distutils Windows .exe
In which case:
Download the exe yourself
Activate your virtualenv
Run easy_install DOWNLOADED_FILE.exe
I rather hopefully tried "pip install" rather than "easy_install", but this didn't work, and likely never will (citation needed).
Finally, I found but haven't tested a solution at http://www.mail-archive.com/python-list#python.org/msg272040.html which is:
Solved this by copying the pywin32.pth file into my virtualenv site-packages
and editing the file to point to the path.
If the other options don't work for you, maybe this will?
For Python 2.7 or 3.x use pypiwin32.
pip install pypiwin32
OK, well since I had to find a way forward I improvised. I've internally created a git repository with a hacked-together version of pywin32 that will install within a virtualenv using the standard setup.py script. It took a lot of fiddling to make it work right but I managed to get it to load and the dependent code now works as I need it to. If people feel this would be of benefit to the community please post a comment: if I get enough I'll try and put something up on my github account.
This may have been improved since previous answer, since I've successfully installed pywin32 on sandbox on several machines without any specific "hacks" :
$ virtualenv sandbox
$ sandbox\scripts\activate
(sandbox) $ git clone https://github.com/Travis-Sun/pywin32.git
(sandbox) $ cd pywin32
(sandbox) $ python setup.py install
Tested with following environment :
windows 7
git
python 2.7.10 with virtualenv
VS2008. It may also work (but I've not tested yet) with
http://www.microsoft.com/en-us/download/details.aspx?id=44266
Edit: Scratch this for now, appears to be some problems with the installation still...
I got rather tired of the whole situation, and just created a set of converted wheels ("wheel convert <.exe>"). I'll try and keep them maintained for the most recent build, but do shout if there are any issues.
https://tr00st.co.uk/python/wheel/pywin32/
Installation can be done easily using pip and pointing to the package matching your version and architecture. For example, for Python 3.5/amd64:
pip install https://tr00st.co.uk/python/wheel/pywin32/pywin32-219-cp35-none-win_amd64.whl
Caveat: The --upgrade process currently fails, as the uninstall procedure is unable to clean up after itself (Access Denied when cleaning up win32api.pyd) - this is only when removing the temporary directory, which can be manually deleted. Easiest way around this is to uninstall and reinstall instead of upgrading, then manually delete the temporary folder.

Categories

Resources