numpy installation on windows 7 - python

I have Python 2.7.9 installed on Windows 7. When I try to install numpy package through pip or by downloading numpy.zip and running python setup.py install, I get various errors containing absence of various libraries. Is it possible to install numpy on Windows for 64-bit Python?

Have you tried these questions/answers?
https://stackoverflow.com/a/28947511/3412545
https://stackoverflow.com/a/4554296/3412545
Installing numpy, matplotlib on windows 7 64 bit
Otherwise, try another distribution link and report back the results here.
EDIT: Found good installation notes for posterity including plugin versions for python 2.7.9
https://code.google.com/p/pythonxy/wiki/StandardPlugins

Related

How to install matlabengine (Windows 10, MATLAB R2020b, Python 3.8.10)

I have the following environment:
Windows 10
Python 3.8.10
MATLAB R2020b
I'm trying to install matlabengine (pip install matlabengine) package, and I'm getting the following error:
RuntimeError: No compatible MATLAB installation found in Windows Registry. This release of MATLAB Engine API for Python is compatible with version 9.13. The found versions were 9.9
What am I missing ? (according to https://pypi.org/project/matlabengine/) it seems I'm using the right versions.
How can I check the versions I have (9.9 or 9.13 because as I wrote above I have MATLAB R2020b and Python 3.8.10).
The error is about the MATLAB version, not the version of matlabengine (the Python module).
You wrote that you have MATLAB 2020b. That is the release name for MATLAB version 9.9, as can be seen in this table on Wikipedia.
As can be read on the description of matlabengine 9.13.1, this engine version requires MATLAB release R2022b (= 9.13).
To use matlabengine with MATLAB 2020b, install version 9.9.1:
python -m pip install matlabengine==9.9.1
You need to try all versions of MATLAB engine starting from the latest one going backwards. What worked for me on Ubuntu was
$ python -m pip install matlabengine==9.12.17
NB: To get a list of all the possible versions, try install one that doesn't exist e.g.
$ python -m pip install matlabengine==9.9.2
and it will give you an error with the list of possible versions.
You can try to install specific version of matlabengine.
pip install matlabengine==9.13.1
If they cannot find your version, you might need to update pip.
Also, you can check your current matlabengine version.
pip show matlabengine

Getting an error saying "Could not build wheels for numpy which use PEP 517 and cannot be installed directly" while installing numpy

I am trying to install a specific version of numpy using the command pip install numpy=1.19.1 in a python virtual environment. But I am getting the following errors
ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
How do I solve this? I am using Python 3.9.6 and Pip 21.1.3. And I am on macOS Big Sur.
I was facing the same error on my MacBook Air(macOS BigSur) Laptop while installing the Numpy package via integrated terminal of VS Code. And I found the solution:
So previously I was using older version of pip i.e. 19.2.3.
But when I upgraded it to the latest version using command
pip install --upgrade pip
and after that when running the command
pip install numpy
it worked absolutely fine.
At the time running the above commands, my python version was 3.8.2.
I think NumPy is not yet being prepared for Python 3.9 since they need to check a lot of times. You should try Python 3.7 or 3.8 is better.
See this thread: https://github.com/numpy/numpy/issues/17569
Edit: Based on the latest news on numpy's website (dated 31st December) Numpy appears to now be supporting python 3.9 and 3.10 as well
If you're on Windows, then install Visual Studio 2019 Build Tools, then go to 'Individual components', then tick the latest version of 'Windows 10 SDK', and 'MSVC v142 x64/86 build tools - Latest'. That solved this error for me, except for me this error came when installing discord.py.
Try seeing if it works with Python 3.8 first though, just like Dhananjay's answer. That could save you a lot of storage, because Visual Studio takes up lots of space. If that doesn't work, you can try my answer.
Edit: I just realised, you said you're on Mac. Try this:
type python -VV in terminal
It should say something like this:
Python 3.9.6 (default, Jun 29 2021, 10:19:25)
[GCC 10.3.0]
Whatever it says on the second line is what you will need to install. I use Python on Ubuntu 21.10 on WSL2, which uses GCC 10.3.0, and I have GCC 10.3.0 installed.
Similarly to the answers above, switching to Python 3.8 solved the issue. Additionally, because of this issue, I couldn't install scikit-image which depends on numpy.
I created a virtual environment of Python 3.8 using conda i.e. conda create -n py38 python=3.8 to switch python version. I have Mac M1, 2020 updated to OS Monterey, version 12.0.1.
yea, I was also using python 3.10 and switched back to python 3.8.
check this link python/downloads to download python 3.8

Unable to Find vcvarsall.bat Windows 10 Python 3.5.1

I'm having an issue installing numpy on Windows 10 x64 with python 3.5.1. When I type pip install numpy, I get the error: unable to find vcvarsall.bat. I've also gotten this error from attempting to install other libraries.
From doing my research on the problem, I know it's related to the Visual C++ compiler for Python, or Visual Studio, as suggested in this answer and others: https://stackoverflow.com/a/10558328/1745715 I've installed both of these (Visual studio 2015, as it is my understanding that 2015 is what I want for python 3.5.1), and can verify that they have added values to my PATH. I've also rebooted the system since. No matter what I try, I still get the error when attempting to install numpy (and other packages) from pip. Could it be that I need a different version of Visual Studio for this version of Python?
I know there are many questions on SO involving similar situations, so before someone marks this a duplicate: I have read them all, and have not found any answer to work for me. Moreover, most of them do not relate to this environment (windows 10 x64, python 3.5.1). The nearest answer was one regarding Python 3.5 on Windows 10 x64 while installing numpy using pip, but the suggestion (to used a precompiled version of numpy and avoid the pip install) was unsatisfactory, as I have other libraries I have to install via pip that are also experiencing the same issues, so I need the compiler to work correctly.

Installing Numpy 1.9.2 for Python 2.7.10 on a 64-bit Windows operating system?

Last night I tried installing Numpy on Windows 8. I have Python 2.7.10 installed on my Windows 8.1 Pro machine. Initially I realized that the only way to easily install Numpy is to install the 1.3 version[1] , which is pretty old. Then I found out that pip can install Numpy, but since my OS is a 64-bit one I cannot use pip directly and have to first deal with Cython, Fortran and other stuffs' installation [2]. In the end I followed the instruction given in [3] and [4] but the error that I get is non of the errors described in [3]. I may mention that I upgraded "wheel" to the latest version before downloading the unofficial, compiled Numpy file downloaded from [5]. The error message that I get is as follows:
numpy-1.9.2+mkl-cp27-none-win_amd64.whl is not a supported wheel on
this platform.
Could you please help me how I can resolve this issue?
Thank you
[1] How do I install SciPy on 64 bit Windows?
[2] Installing NumPy and SciPy on 64-bit Windows (with Pip)
[3] How do I install pip on Windows?
[4] https://gehrcke.de/2015/02/how-to-set-up-a-64-bit-version-of-numpy-on-windows/
[5] http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
Something similar happened to me, the point is that even the system be 64-bit, install the 32-bit version, the installation will occur usually when I did that worked with matplotlib and numpy.
http://sourceforge.net/projects/numpy/files/NumPy/1.9.2/numpy-1.9.2-win32-superpack-python2.7.exe/download

Error Installing Pandas using pip, Windows 7 64bit Python 3.2

I am trying to install the pandas library on Python 3.2 on Windows 7 64bit.
The pip log is here.
http://pastebin.com/Vuitwaz9
I do not recommend trying to build pandas (or any Python library containing C extensions) on 64-bit Windows unless you are using the Enthought Python Distribution (which comes bundled with a viable build environment) or you are in the mood for a yak shaving expedition (you would need to install the VS2008 SDK and do some finagling of Python's distutils config). You can find one-click binary installers for pandas 64-bit Python 3.2 on the Python Package Index.

Categories