Can't pip install Tensorflow 'msvcp140_1.dll' missing - python

I am currently trying to pip install tensorflow, which works but after I install it, and then import it into my python module via import tensorflow as tf I get following error message:
ImportError: Could not find the DLL(s) 'msvcp140_1.dll'. TensorFlow requires that
these DLLs be installed in a directory that is named in your %PATH% environment
variable. You may install these DLLs by downloading "Microsoft C++ Redistributable
for Visual Studio 2015, 2017 and 2019" for your platform from this URL:
https://support.microsoft.com/help/2977003/the-latest-supported-visual-c-downloads
I installed the msvcp140_1.dll and put it into C:\Users\User\AppData\Local\Programs\Python\Python37 which is contained in my path environment variable.
As you can see I am using Python 3.7 as 3.8 is not supported by tensorflow.
Any ideas how to fix this?

You can find msvcp140.dll in your %windows%/System32 folder, once you installed VC++ DIST for VS 2015, for msvcp140_1.dll you need to goto this page
https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
and in the section :Visual Studio 2015, 2017 and 2019, pick the correct package with the arch of your PC.

Just click this link https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads Then install
x64: vc_redist.x64.exe
and restart your pc.

I recommend you this setup tutorial, it works on my computer. And you need python 3.6 for Tensorflow instead of 3.7.
https://github.com/jeffheaton/t81_558_deep_learning/blob/master/manual_setup.ipynb

In my case, Downloading Visual C++ from the url below works.
https://support.microsoft.com/en-gb/help/2977003/the-latest-supported-visual-c-downloads

Related

Failed building wheel for onewire

For a small python project, I'm need to include the "onewire" package.
I tried to install it with
pip install onewire
I then get a huge error message, that includes:
Failed building wheel for onewire
Running setup-py clean for onewire ... error
(Full picture attached Sorry, I couldn't copy/paste it because it's all written on one line...)
I already tried:
pip install wheel
which didn't work. Also, I've tried to install it via the PyCharm Packages installer which resulted in the same error message.
I use the following versions:
Python 3.8.2
Pip 20.2.2
I also updated my visual studio installations
(Picture) Visual Studio Installations
(Picture) Visual Studio 2017 Configuration
(Picture) Visual Studio 2019 Configuration
Does anyone know how to fix that?
Thanks in advance.
You'd need build tools for Visual Studio to install the Microsoft Visual C++ 14.0.
Download it from here.
When you begin the installer, it will have several "options" enabled which will balloon the install size to 5gb. If you have Windows 10, you'll need to leave selected the "Windows 10 SDK" option.
Since, the current link to the build tool directs to the Visual Studio 2017, you'd also need to these:
A. VC++ 2017 version xx.x tools
B. Windows SDK to use standard libraries.

Why i Can't install Levenshtein package on Windows Python 3.8.1? [duplicate]

I've installed Python 3.5 and while running
pip install mysql-python
it gives me the following error
error: Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
I have added the following lines to my Path
C:\Program Files\Python 3.5\Scripts\;
C:\Program Files\Python 3.5\;
C:\Windows\System32;
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC;
C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
I have a 64-bit Windows 7 setup on my PC.
What could be the solution for mitigating this error and installing the modules correctly via pip.
Your path only lists Visual Studio 11 and 12, it wants 14, which is Visual Studio 2015. If you install that, and remember to tick the box for Languages → C++ then it should work.
On my Python 3.5 install, the error message was a little more useful, and included the URL to get it from:
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
New working link.
As suggested by Fire, you may also need to upgrade setuptools package for the error to disappear:
pip install --upgrade setuptools
Binary install it the simple way!
Use the binary-only option for pip. For example, for mysqlclient:
pip install --only-binary :all: mysqlclient
Many packages don't create a build for every single release which forces your pip to build from source. If you're happy to use the latest pre-compiled binary version, use --only-binary :all: to allow pip to use an older binary version.
To solve any of the following errors:
Failed building wheel for misaka
Failed to build misaka
Microsoft Visual C++ 14.0 is required
Unable to find vcvarsall.bat
The solution is:
Go to Build Tools for Visual Studio 2017
Select free download under Visual Studio Community 2017. This will download the installer. Run the installer.
Select what you need under workload tab:
a. Under Windows, there are three choices. Only check Desktop development with C++.
b. Under Web & Cloud, there are seven choices. Only check Python development (I believe this is optional, but I have done it).
In cmd, type pip3 install misaka.
Note if you already installed Visual Studio then when you run the installer, you can modify yours (click modify button under Visual Studio Community 2017) and do steps 3 and 4.
Final note: If you don't want to install all modules, having the three below (or a newer version of the VC++ 2017) would be sufficient. (You can also install the Visual Studio Build Tools with only these options, so you don’t need to install Visual Studio Community Edition itself) => This minimal install is already a 4.5 GB, so saving off anything is helpful
As the other responses point out, one solution is to install Visual Studio 2015. However, it takes a few GBs of disk space.
One way around is to install precompiled binaries. The webpage Unofficial Windows Binaries for Python Extension Packages (mirror) contains precompiled binaries for many Python packages. After downloading the package of interest to you, you can install it using pip install, e.g. pip install mysqlclient‑1.3.10‑cp35‑cp35m‑win_amd64.whl.
I had the exact issue while trying to install the Scrapy web scraping Python framework on my Windows 10 machine. I figured out the solution this way:
Download the latest (the last one) wheel file from this link: wheel file for twisted package
I'd recommend saving that wheel file in the directory where you've installed Python, i.e., somewhere on the local disk C:
Then visit the folder where the wheel file exists and run pip install <*wheel file's name*>
Finally, run the command pip install Scrapy again and you're good to use Scrapy or any other tool which required you to download a massive Windows C++ Package/SDK.
Disclaimer: This solution worked for me while trying to install Scrapy, but I can't guarantee the same happening while installing other software, packages, etc.
After reading a lot of answers on Stack Overflow and none of them working, I finally managed to solve it following the steps in this question. I will leave the steps here in case the page disappears:
Please try to install Build Tools for Visual Studio 2017, select the workload “Visual C++ build tools” and check the options "C++/CLI support" and "VC++ 2015.3 v14.00 (v140) toolset for desktop" as below.
I had this exact issue while trying to install mayavi.
I also had the common error: Microsoft Visual C++ 14.0 is required when pip installing a library.
After looking across many web pages and the solutions to this question, with none of them working, I figured out these steps (most taken from previous solutions) allowed this to work.
Go to Build Tools for Visual Studio 2017 and install Build Tools for Visual Studio 2017. Which is under All downloads (scroll down) → Tools for Visual Studio 2017
If you have already installed this, skip to 2.
Select the C++ components you require (I didn't know which I required, so I installed many of them).
If you have already installed Build Tools for Visual Studio 2017 then open the application Visual Studio Installer then go to Visual Studio Build Tools 2017 → Modify → Individual Components and selected the required components.
From other answers, important components appear to be: C++/CLI support, VC++ 2017 version <...> latest, Visual C++ 2017 Redistributable Update, Visual C++ tools for CMake, Windows 10 SDK <...> for Desktop C++, Visual C++ Build Tools core features, Visual Studio C++ core features.
Install/Modify these components for Visual Studio Build Tools 2017.
This is the important step. Open the application Visual Studio Installer then go to Visual Studio Build Tools → Launch. Which will open a CMD window at the correct location for Microsoft Visual Studio\YYYY\BuildTools.
Now enter python -m pip install --upgrade setuptools within this CMD window.
Finally, in this same CMD window, pip install your Python library: pip install -U <library>.
Use this link to download and install Visual C++ 2015 Build Tools. It will automatically download visualcppbuildtools_full.exe and install Visual C++ 14.0 without actually installing Visual Studio.
After the installation completes, retry pip install and you won't get the error again.
I have tested it on the following platforms and versions:
Python 3.6 on Windows 7 64-bit
Python 3.8 on Windows 10 64-bit
Use this and save time
pip install pipwin
pipwin install yourLibrary
pipwin is like pip, but it installs precompiled Windows binaries provided by Christoph Gohlke. Saves you a lot of time googling and downloading.
And in this case pipwin will solve the problem
Error: Microsoft Visual C++ 14.0 is required (Unable to find vcvarsall.bat)
Read more about pipwin and here they mention Microsoft Visual C++
I had the same problem when installing the spaCy module. And I checked the control panel, and I had several Microsoft Visual C++ redistributables installed already.
I selected "Microsoft Visual Studio Community 2015" which was already installed on my PC → "Modify" → check "Common Tools for Visual C++ 2015". Then it will take some time and download more than 1 GB to install it.
This fixed my issue. Now I have spaCy installed.
I had this same problem. A solution for updating setuptools
pip install -U setuptools
or
pip install setuptools --upgrade
Make sure that you've installed these required packages. It worked perfectly in my case as I installed the checked packages:
To expand on the answers by ocean800, davidsheldon and user3661384:
You should now no longer use Visual Studio Tools 2015 since a newer version is available. As indicated by the Python documentation, you should be using Visual Studio Tools 2017 instead.
Visual C++ Build Tools 2015 was upgraded by Microsoft to Build Tools for Visual Studio 2017.
Download it from here.
You will also require setuptools. If you don't have setup tools, run:
pip install setuptools
Or if you already have it, be sure to upgrade it.
pip install setuptools --upgrade
For the Python documentation link above you will see that setuptools version must be at least 34.4.0 for Visual Studio Tools to work.
Use the link to Visual C++ 2015 Build Tools. That will install Visual C++ 14.0 without installing Visual Studio.
I had the same issue. Downloading the Build Tools for Visual Studio 2017 worked for me.
I had exactly the same issue and solved it by installing mysql-connector-python with:
pip install mysql-connector-python
I am on Python 3.7 and Windows 10 and installing Microsoft Build Tools for Visual Studio 2017 (as described here) did not solve my problem that was identical to yours.
Just go to https://www.lfd.uci.edu/~gohlke/pythonlibs/ find your suitable package (whl file). Download it. Go to the download folder in cmd or typing 'cmd' on the address bar of the folder. Run the command :
pip install mysqlclient-1.4.6-cp38-cp38-win32.whl
(Type the file name correctly. I have given an example only). Your problem will be solved without installing build toll cpp of 6GB size.
To add on top of Sushant Chaudhary's answer:
In my case, I got another error regarding lxml as below:
copying src\lxml\isoschematron\resources\xsl\iso-schematron-xslt1\readme.txt -> build\lib.win-amd64-3.7\lxml\isoschematron\resources\xsl\iso-schematron-xslt1
running build_ext
building 'lxml.etree' extension
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools
I had to install lxml‑4.2.3‑cp37‑cp37m‑win_amd64.whl the same way as in the answer of Sushant Chaudhary to successfully complete installation of Scrapy.
Download lxml‑4.2.3‑cp37‑cp37m‑win_amd64.whl from Lxml
put it in folder where Python is installed
install it using pip install <file-name>
Now you can run pip install scrapy.
I had the same exact issue on my windows 10 python version 3.8.
In my case, I needed to install mysqlclient were the error occurred Microsoft Visual C++ 14.0 is required. Because installing visual studio and it's packages could be a tedious process, Here's what I did:
step 1 - Go to unofficial python binaries from any browser and open its website.
step 2 - press ctrl+F and type whatever you want. In my case it was mysqlclient.
step 3 - Go into it and choose according to your python version and windows system. In my case it was mysqlclient‑1.4.6‑cp38‑cp38‑win32.whl and download it.
step 4 - open command prompt and specify the path where you downloaded your file. In my case it was C:\Users\user\Downloads
step 5 - type pip install .\mysqlclient‑1.4.6‑cp38‑cp38‑win32.whl and press enter.
Thus it was installed successfully, after which I went my project terminal re-entered the required command. This solved my problem
Note that, while working on the project in pycharm, I also tried installing mysql-client from the project interpreter. But mysql-client and mysqlclient are different things. I have no idea why and it did not work.
I had a similar situation installing pymssql.
pip was trying to build the package, because there were no official wheels for Python 3.6 and Windows.
I solved it by downloading an unofficial wheel from Unofficial Windows Binaries for Python Extension Packages.
Specifically for your case: MySQL-python
I just had the same issue while using the latest Python 3.6. With Windows OS 10 Home Edition and a 64-bit operating system.
Steps to solve this issue:
Uninstall any versions of Visual Studio you have had, through Control Panel
Install Visual Studio 2015 and chose the default option that will install
Visual C++ 14.0 on its own
You can use PyCharm for installing Scrapy: Menu Project → Project Interpreter → + (install Scrapy)
Check Scrapy in the REPL and PyCharm by import. You should not see any errors.
None of the solutions here and elsewhere worked for me. It turns out an incompatible 32-bit version of mysqlclient is being installed on my 64-bit Windows 10 OS because I'm using a 32-bit version of Python.
I had to uninstall my current Python 3.7 32 bit, and reinstalled Python 3.7 64 bit and everything is working fine now.
If Visual Studio is NOT your thing, and instead you are using VS Code, then this link will guide you thru the installer to get C++ running on your Windows.
You only needs to complete the Pre-Requisites part.
https://code.visualstudio.com/docs/cpp/config-msvc/#_prerequisites
This is similar with other answers, but this link will probably age better than some of the responses here.
PS: don't forget to run pip install --upgrade setuptools
This works for me:
pip install --only-binary :all: mysqlclient
I tried ALL of the above and none worked. Just before before signing up for the booby hatch, I found another reason for the error : using the wrong shell on Windows.
conda init cmd.exe
did the trick for me. Hope it may save someone else, too.
I was facing the same problem. The following worked for me:
Download the unofficial binaries file from Christoph Gohlke installers site as per the Python version installed on your system.
Navigate to the folder where you have installed the file and run
pip install filename
For me python_ldap‑3.0.0‑cp35‑cp35m‑win_amd64.whl worked as my machine is 64 bit and Python version is 3.5.
This successfully installed python-ldap on my Windows machine. You can try the same for mysql-python.
Look if the package has an official fork that include the necessary binary wheels.
I needed the package python-Levenshtein, had this error, and found the package python-Levenshtein-wheels instead.
I had the same problem. I needed a 64-bit version of Python so I installed 3.5.0 (the most recent as of writing this). After switching to 3.4.3 all of my module installations worked.
Python Releases for Windows
I had the same issue while installing mysqlclient for the Django project.
In my case, it's the system architecture mismatch causing the issue. I have Windows 7 64bit version on my system. But, I had installed Python 3.7.2 32 bit version by mistake.
So, I re-installed Python interpreter (64bit) and ran the command
pip install mysqlclient
I hope this would work with other Python packages as well.
TLDR run vcvars64.bat
After endlessly searching through similar questions with none of the solutions working.
-Adding endless folders to my path and removing them. uninstalling and reinstalling visual studio commmunity and build tools.
and step by step attempting to debug I finally found a solution that worked for me.
(background notes if anyone is in a similar situation)
I recently reset my main computer and after reinstalling the newest version of python (Python3.9) libraries I used to install with no troubles (main example pip install opencv-python) gave
cl
is not a full path and was not found in the PATH.
after adding cl to the path from
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.27.29110\bin\Hostx64\x64
and several different windows kits one at a time getting the following.
The C compiler
"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe"
is not able to compile a simple test program.
with various link errors or " Run Build Command(s):jom /nologo cmTC_7c75e\fast && The system cannot find the file specified"
upgrading setuptools and wheel from both a regular command line and an admin one did nothing as well as trying to manually download a wheel or trying to install with --only-binary :all:
Finally the end result that worked for me was running the correct vcvars.bat for my python installation namely running
"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" once (not vcvarsall or vcvars32) (because my python installed was 64 bit) and then running the regular command pip install opencv-python worked.

When I open python3.6 from windows10 build 9845, python prompts api-ms-win-crt-runtime-l1-1-0.dll missing

OS:Windows10 build 9845 x64
python ver:python3.6.1
I tried to install python 3.6.1 on my computer, python can be installed normally, but when I start python, it prompts api-ms-win-crt-runtime-l1-1-0.dll is missing.
I Attempted to install the Visual C++ Redistributable, but it does not work. In addition, I was unable to install the KB2999226 patch on my computer, suggesting that this patch does not apply to your computer.
Finally, I try to download this dll from the Internet to register, but when I open python he will prompt other dlls to be lost.
I do not want to install windows7 or windows10.
How can I do it? Thank you for your help
Installed vc-redist.x64 (Visual C++ Redistributable for Visual Studio 2015) from microsoft site
and Python 3.6.5 32-bit (on Windows 7 64-bit) from https://www.python.org/downloads/ and the above error (api-ms-win-crt-runtime-l1-1-0.dll is missing) is gone.

Geopandas import error [duplicate]

I have installed Python 2.5.4, Numpy 1.5.0 win32, Matplotlib 1.0.0 win32, pywin32 218. Still not able to plot graphs in Python. Here is the error I am getting :
import pylab
File "C:\Python25\lib\site-packages\pylab.py", line 1, in <module>
from matplotlib.pylab import *
File "C:\Python25\lib\site-packages\matplotlib\pylab.py", line 216, in <module>
from matplotlib import mpl # pulls in most modules
File "C:\Python25\lib\site-packages\matplotlib\mpl.py", line 1, in <module>
from matplotlib import artist
File "C:\Python25\lib\site-packages\matplotlib\artist.py", line 6, in <module>
from transforms import Bbox, IdentityTransform, TransformedBbox, TransformedPath
File "C:\Python25\lib\site-packages\matplotlib\transforms.py", line 34, in <module>
from matplotlib._path import affine_transform
ImportError: DLL load failed: The specified module could not be found.
Please kindly help..
(I found this answer from a video: http://www.youtube.com/watch?v=xmvRF7koJ5E)
Download msvcp71.dll and msvcr71.dll from the web.
Save them to your C:\Windows\System32 folder.
Save them to your C:\Windows\SysWOW64 folder as well (if you have a 64-bit operating system).
Now try running your code file in Python and it will load the graph in couple of seconds.
I had the same issue with importing matplotlib.pylab with Python 3.5.1 on Win 64. Installing the Visual C++ Redistributable für Visual Studio 2015 from this links: https://www.microsoft.com/en-us/download/details.aspx?id=48145 fixed the missing DLLs.
I find it better and easier than downloading and pasting DLLs.
For Windows 10 x64 and Python:
Open a Visual Studio x64 command prompt, and use dumpbin:
dumpbin /dependents [Python Module DLL or PYD file]
If you do not have Visual Studio installed, it is possible to download dumpbin elsewhere, or use another utility such as Dependency Walker.
Note that all other answers (to date) are simply random stabs in the dark, whereas this method is closer to a sniper rifle with night vision.
Case study 1
I switched on Address Sanitizer for a Python module that I wrote using C++ using MSVC and CMake.
It was giving this error: ImportError: DLL load failed: The specified module could not be found
Opened a Visual Studio x64 command prompt.
Under Windows, a .pyd file is a .dll file in disguise, so we want to run dumpbin on this file.
cd MyLibrary\build\lib.win-amd64-3.7\Debug
dumpbin /dependents MyLibrary.cp37-win_amd64.pyd which prints this:
Microsoft (R) COFF/PE Dumper Version 14.27.29112.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file MyLibrary.cp37-win_amd64.pyd
File Type: DLL
Image has the following dependencies:
clang_rt.asan_dbg_dynamic-x86_64.dll
gtestd.dll
tbb_debug.dll
python37.dll
KERNEL32.dll
MSVCP140D.dll
VCOMP140D.DLL
VCRUNTIME140D.dll
VCRUNTIME140_1D.dll
ucrtbased.dll
Summary
1000 .00cfg
D6000 .data
7000 .idata
46000 .pdata
341000 .rdata
23000 .reloc
1000 .rsrc
856000 .text
Searched for clang_rt.asan_dbg_dynamic-x86_64.dll, copied it into the same directory, problem solved.
Alternatively, could update the environment variable PATH to point to the directory with the missing .dll.
Please feel free to add your own case studies here! I've made it a community wiki answer.
Installing the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 worked for me with a similar problem, and helped with another (slightly different) driver issue.
Since Python 3.8, it is possible that Dependencies or dumpbin /dependents reports no dependency issue, but one still gets the error "The specified module could not be found". This is because the PATH variable is no longer used for resolving DLLs of binary modules!
The solution is to use os.add_dll_directory:
import os
os.add_dll_directory(r"C:\path\to\your\dll\directory")
import your_module
Quick note:
Check if you have other Python versions, if you have removed them, make sure you did that right. If you have Miniconda on your system then Python will not be removed easily.
What worked for me: removed other Python versions and the Miniconda, reinstalled Python and the matplotlib library and everything worked great.
I installed vc++ which solved this problem.
Reinstall the related packages.
I have the same issue with numpy. I first uninstalled it:
pip uninstall numpy
and then installed again
pip install numpy==1.20.1
I needed that specific version. If you want to install other numpy versions, you may ignore ==1.20.1.
Also, during the installation, I received errors such as
statsmodels 0.12.2 requires patsy>=0.5, which is not installed.
I installed those missing prerequisites as well. e.g.,
pip install patsy
I just uninstalled my current numpy and installed a wheel numpy from this link.
This has solved my issue. I guess we shoudn't use dll from random source.
This might be issue of missing Microsoft Visual C++ Redistributable packages for Visual Studio 2015, 2017, 2019, and 2022 in your machine. Use the following link to download the distributable and install it in your machine.
VC_redist.x64.exe
For more: Microsoft Visual C++ Redistributable Latest Supported Downloads
I've been through this error and what I found after a lot of investigation:-
issue was in Opencv==4.5.1 build from source with cuda and flag cuda_with_fast_math=on
I just rebuild OpenCV and disable
cuda_with_fast_math
make sure that the shared library builded with cv version matched your current version
and it works for me.

Using NumPy in Visual Studio

I downloaded http://pytools.codeplex.com/ (Python Tools for Visual Studio) so that I could write Python in Visual Studio.
The problem is when I try to use the most basic package "numpy" like so:
import numpy
It says "No module named 'numpy'."
How can I use NumPy and SciPy in Visual Studio?
Note: I am using Canopy Express on another machine which works perfectly; however, I don't want to install it on this machine since I already have Visual Studio installed.
I added the Python 3.3 environment to my Python "solution" by right-clicking Python environments and clicking add an environment. But, after right-clicking my environment and clicking install Python package, I typed in "numpy" and got this error when trying to install it:
...
creating build
creating build\src.win32-3.3
creating build\src.win32-3.3\numpy
creating build\src.win32-3.3\numpy\distutils
building library "npymath" sources
No module named 'numpy.distutils.msvccompiler' in numpy.distutils; trying from distutils
error: Unable to find vcvarsall.bat
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in c:\users\dom\appdata\local\temp\pip_build_Dom\numpy
Storing complete log in C:\Users\Dom\pip\pip.log
'numpy' failed to install. Exit code: 1
How can I install NumPy?
In Visual Studio 2013 Community Edition with a Python 2.7 environment, the following worked for me:
Open the Python Environments menu in Solution Explorer, and click on "Install Python Package..."
Then write "numpy":
Two solutions worked for me:
Going directly to my Python folder and installing the packages using pip.
Creating a virtual environment in my project and installing packages from within Visual Studio.
Consider using a more feature-rich Windows distribution of Python, like Anaconda. It comes with a boatload of packages included into the installer. This is quite handy for those who are new to Python, especially when they are using Windows.
Edit:
As of 2020, I would suggest using the python.org distribution of Python. Compiler issues on ms-windows have finally been fixed, so a lot of projects now provide binary packages (wheels) for ms-windows. Among others numpy, pandas, matplotlib, pillow, Cython and PyNaCl.
Note that wheel names ending in:
win_amd64.whl are for 64-bit versions of ms-windows, and
win32.whl are for 32-bit.
I actually ran into the same set of problems when trying to use Visual Studio for Python.
I managed to get things to work at the end - please see Using Visual Studio 2013 for Python (3.4) with NumPy and SciPy on Windows for details. Essentially you can either use the installer (if one is available) or use pip to do the installation.
Make sure C++ Common Tools are installed in Visual Studio:
See under Extra in the Visual Studio (Extra-Python-Interactive Window).
It has the ability to switch the interactive console through a different platform/Python version (32-bit, 64-bit, Debug, and Anaconda (which has the NumPy package)).
From PTVS Installation:
2. Installing packages individually
Here are some recommended packages. Generally you want to install packages using pip or through the interface in Visual Studio (which uses pip), as this will ensure that you get the latest version that will work with your version of Python, as well as any dependencies.
Some packages have complex dependencies and need to be downloaded manually, either from the project's website or from Christoph Gohlke's package collection.
I installed numpy and scipy from these links, and it works perfectly with Visual Studio.
numpy http://sourceforge.net/projects/numpy/files/NumPy/
scipy http://sourceforge.net/projects/scipy/files/scipy/
Matplotlib http://matplotlib.org/downloads.html
Pandas http://pandas.pydata.org/getpandas.html
Well, if anyone still has problem than what worked for me is:
C:/Users/DELL/AppData/Local/Programs/Python/Python39/python.exe -m pip install numpy
where the first part is simply the path of python.

Categories