I start a Django project by Pycharm and require to use the Mysql as database, there is somthing wrong with installing the mysqlclient package.I have searched the info and downloaded the package from www.lfd.uci.edu.When I pip install the .whl file,it told me not match the platform. But I use the same package to pip install in cmd sucessfully. I wonder there is something different between the venv and local? the detail screenshot as below:
my venv Python version:
Python 3.8.8 (default, Apr 13 2021, 15:08:03) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
I have try some different version mysqlclient
pip install mysqlclient-1.4.6-cp38-cp38-win32.whl
pip install mysqlclient-1.4.6-cp38-cp38-win_amd64.whl
both of above are wrong as below:
mysqlclient-1.4.6-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
I don`t have the enough reputation to post the image,I just can let them as a tags.I hope someone can help me out.Thanks for reading this question.
use
pip install mysqlclient
When you already compilred packages on your system it shouldn't cause a problem.
See for more information
If you need an older Version
pip install mysqlclient==1.4.6
Related
I tried to create a new project with Pycharm with new Environment, using pipenv, but pycharm did not create one with error "CreateProcess error=193, %1 is not a Win32 application".
After that, I deleted the Pipfile and Pipfile.lock and created Pycharm project with new environment, using virtualenv. Then I tried to install packages with "pip install pipenv" and "pipenv install *" and got error "Could not find a version that satisfies the requirement tensorflow" tried to install tensorflow==2.2.0.
My python interpreter version is Python 3.8.5 (tags/v3.8.5:580fbb0, Jul 20 2020, 15:57:54) [MSC v.1924 64 bit (AMD64)] on win32.
I don't understand what's wrong with me. When I created virtual environment with pipenv, everything worked with console, but did not work on Pycharm...
Creating environments with pycharm is a headache. Better stick with the conslole commands, so you have compatibility.
pip was selected while installing ,but when i checked scripts folder ,the folder was empty
since scripts are missing i cannot use pip cammand on terminal,new to programming please help me!!!
i tried installing pip this particular error showes up!!
FOR WINDOWS ONLY
open cmd.
then type pip help, if pip is installed then a message would come explaining how to
use it else an error message stating that the program is not found.
then type python and see whether that's installed properly , if you receive this
Python is not recognized as an internal or external command, operable program or batch file then this means that python is not installed on your system and you need to
reinstall it. Or if it is installed properly then you would get something like this
Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) [MSC v.1928 64 bit
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
to install pip download this pip install and then open your cmd in that folder
where you have installed it by using the cd command(like if you have installed it in downloads you should type in the cmd cd Downloads), then type this python get-pip.py.
And this should have installed pip on your system . (see step 1 to see if it works)
Then just upgrade pip and you are good to go , you can upgrade pip by python -m pip install --upgrade pip
Then try installing a module like pip install tksplash in the cmd.
FOR LINUX ONLY
open your terminal and type sudo apt install python3-pip(works only on debian based disrtos like -: Ubuntu ,Kali , Parrot))
you have not install any pip packages.
you can install new one, then refresh dir.
pip install Flask
Installing Anaconda will be better option. It has all packages required.
get-pip.py needs to be downloaded and run python get-pip.py.
Use Python 3.10, it installs pip properly out of the box.
I'm trying to install Pytorch with Windows and I'm using the commands of the official site
https://pytorch.org/get-started/locally/
pip3 install torch==1.2.0 torchvision==0.4.0 -f https://download.pytorch.org/whl/torch_stable.html
This is the command if I choose Windows, Cuda 10.0, and Python 3.7
But if I run this I get the error message:
ERROR: Could not find a version that satisfies the requirement torch==1.2.0 (from versions: 0.1.2, 0.1.2.post1, 0.1.2.post2)
ERROR: No matching distribution found for torch==1.2.0
So why does this happen?
My pip is version 19.2 and I am in a newly installed python 3.7 environment
I tried multiple solutions and it wasn't working on Windows 10 until I tried this:
pip install torch==1.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
If you want your GPU enabled then remove the "+CPU":
pip install torch==1.5.0 -f https://download.pytorch.org/whl/torch_stable.html
The most likely reason for Your issue is a 32-bit installation of python, while the torch libraries rely on having a 64-bit version. I had exactly the same issue.
Just start python from command line and observe
C:\Users\marci>python
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
My installation now shows 64 bits. If Yours shows 32, then install 64-bit python. I used this link: Official python 64-bit Windows installer
So you have Cuda 10 installed? If you do, try this:
pip3 install https://download.pytorch.org/whl/cu100/torch-1.2.0-cp37-cp37m-win_amd64.whl
followed by:
pip3 install torchvision
To check if it was installed properly, type this into your command line:
python
followed by:
from __future__ import print_function
import torch
x = torch.rand(5, 3)
print(x)
If you get this output:
tensor([[0.3380, 0.3845, 0.3217],
[0.8337, 0.9050, 0.2650],
[0.2979, 0.7141, 0.9069],
[0.1449, 0.1132, 0.1375],
[0.4675, 0.3947, 0.1426]])
PyTorch was installed correctly!
I had the same issue, and what I noticed is that I was using Python 3.8.1 and the latest PyTorch was for Python 3.7.
I uninstalled Python 3.8.1 and installed 3.7.6 and voila, it worked!
Not sure if this is your case, but it helped me.
pip install torch==1.2.0+cpu torchvision==0.4.0+cpu -f https://download.pytorch.org/whl/torch_stable.html
Please use this, worked out for me.
Try installing via .whl file from Christoph Gohlke's repo at this link: https://www.lfd.uci.edu/~gohlke/pythonlibs/
Make sure you get the right one for your python version (cp37 at the bottom).
Navigate to the file or save it to your working directory, then use
pip3 install path-to-file.whl
Link to .whl file on page
The most likely reason for Your issue is a 32-bit installation of python, while the torch libraries rely on having a 64-bit version. I had exactly the same issue.
Just start python from command line and observe
C:\Users\marci>python
Python 3.7.4 (tags/v3.7.4:e09359112e, Jul 8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)] on win32
My installation now shows 64 bits. If Yours shows 32, then install 64-bit python. I used this link: Official python 64-bit Windows installer
it is the best answer
Go here https://pytorch.org/get-started/previous-versions/ and find the appropriate command for the version you want.
But first it is best to create an virtual environment with the right version of python
conda create -n you_env_name python=?.?.?
Then activate the environment
conda activate your_env_name
try the following in your IDE command prompt then restart the IDE:
conda install pytorch -c pytorch
it's because your python version is 32bit while you're trying to download a 64bit version of Pytorch, navigate to pytorch_whl_page and choose an appreciate version of Pytorch
or reinstall python from the official Python page to a 64bit version
You will find the correct code to run on the PyTorch website.
There, you can choose your OS, platform, pip, conda and other customisation.
For example, the code to install the PyTorch package on Windows using pip and the CUDA 10.2 platform is (without the quotes:
"pip3 install torch==1.9.0+cu102 torchvision==0.10.0+cu102 torchaudio===0.9.0 -f https://download.pytorch.org/whl/torch_stable.html"
Just downgrade your python version. I was using Python 3.10 then I uninstalled that and reinstalled python 3.7. It started working for me
PyTorch is now torch.
import torch
print(help("torch"))
I have been trying to install PyTorch in Windows 10 for Python 3.7.1
I do not have Anaconda on my machine, and do not wish to install it. I believe I have already satisfied all the necessary prerequisites (CUDA v10.0, NumPy). When I run the following installation command in the admin command line, (found on the PyTorch webpage):
pip3 install https://download.pytorch.org/whl/cu100/torch-1.0.0-cp37-cp37m-win_amd64.whl
I received the following error:
torch-1.0.0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.
I tried downloading the wheel file in my browser, then running a modified command in my downloads directory.
pip install torch-1.0.0-cp37-cp37m-win_amd64.whl
I received the same error message. My pip version is up to date and I am attempting to install the appropriate wheel file for my Python version. This problem is unique to others, as I do not want to use Conda to install PyTorch. What is causing this problem?
The wheel I was trying to install required 32 bit Python, I had 64 bit Python installed. Therefore, the wheel I was trying to install was not compatible with my Python version.
Checking Python Version:
I confirmed my Python version using the following command:
python -c "import struct; print(struct.calcsize('P') * 8)"
Checking Wheel Version:
64 bit wheels typically contain amd64 or similar in their title
32 bit wheels typically contain win32or similar in their title
Switching to a 64 bit Python Installaion:
The default Windows Python installer does not have a 64 bit option. To acquire 64 bit Python, navigate to python.org/downloads/windows/, and select a version that specifies x86-64 (the other versions are all 32 bit).
Credit to phd for the comment that led to this solution.
A Redditor had the same problem here.
This is my first question on this site so I hope I format this correctly. I also am very new to programming so bear with my lack of knowledge, thank you!
I'm trying to install pyHook like so and I keep getting this error message:
C:\Python27>py -2.7 -m pip install pyHook-1.5.1-cp27-cp27M-win_amd64.whl
pyHook-1.5.1-cp27-cp27M-win_amd64.whl is not a supported wheel on this platform.
I have python 2.7.14 as you can see from below:
Python 2.7.14 (v2.7.14:84471935ed, Sep 16 2017, 20:25:58) [MSC v.1500 64 bit
(AMD64)] on win32
Just in case, I tried updating pip and It said it was up to date. I also tried install this version of the .whl and I get the same error:
C:\Python27>py -2.7 -m pip install pyHook-1.5.1-cp27-cp27m-win32.whl
pyHook-1.5.1-cp27-cp27m-win32.whl is not a supported wheel on this platform.
From reading online I believe cp27 indicates its for python 2.7 and to be safe I tried the 64 bit and 32 bit files, but nothing seems to work. If anyone could offer up any solutions or advice, it would be greatly appreciated!
I installed Python 2.7, then pyHook and was able to get it working following these exact steps.
Note, I was using Anaconda to create the Python 2.7 environment and Windows 10 is my OS.
conda create -n python27 python=2.7 This created a new conda environment with python 2.7.14.
activate python27
python -m pip install --upgrade pip This installed pip version 10.0.0
Downloaded pyHook from the unofficial windows binaries.
Specifically: pyHook-1.5.1-cp27-cp27m-win_amd64.whl
Navigated to downloads folder in command prompt
pip install pyHook-1.5.1-cp27-cp27m-win_amd64.whl
That installed it properly with no error messages. Hope that helps. My guess is that the new pip version fixes it, or there is a problem with how you are installing Python 2.7, so try Anaconda (or miniconda if you want to keep it light)
I was also able to import it with no problem after these steps.
Many binaries depend on numpy-1.13+mkl and the Microsoft Visual C++ 2008 (x64, x86, and SP1 for CPython 2.7), Visual C++ 2010 (x64, x86, for CPython 3.4), or the Visual C++ 2017 (x64 or x86 for CPython 3.5, 3.6, and 3.7) redistributable packages.
Install numpy+mkl before other packages that depend on it.
I have Microsoft Visual C++ 2008.I just do this,
python -m pip install numpy-1.13.3+mkl-cp27-cp27m-win_amd64.whl
python -m pip install pyHook-1.5.1-cp27-cp27m-win_amd64.whl
then it work.