I am having a strange issue installing numpy or nltk python-modules in my windows-7 machine. I have successfully installed Python 2.7.12 but I get this error when I type pip install numpy as in this screenshot. I have also included the directory of pip.exe in the PATH. Any help would be appreciated.Thank you :)
Installing such these things in windows are sometime difficult, specially for someone new to python packages(also for some experts!)
Try to use Anaconda for windows: https://www.continuum.io/downloads#_windows
This install a python for you and many requirement packages(e.g Numpy, Scipy, Scikit and many more)
You can use older version of Anaconda, for python2.x if you want strictly python2.x
An alternative way is to download Numpy from github and then install it as a python package, that contain setup.py file
python setup.py install
Or you can download Numpy wheel package, then install it localy with pip
Related
The Mac Book Air M1 chip doesn't seem to support pep517 according to the errors of installing third-party libraries with pip or brew. Even using these methods without pep517 downloading the library locally didn't work. How does one circumvent this?
Error from using pip install pandas:
Failed to build numpy
ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
I've tried this:
pip install <lib>
installing the library locally and trying to install with pip without pep517
brew install <lib>
openblas installation of lib
python env on the intel venv
I had the exact same problem, with a different library but with the same error code for PEP 517, I was using python 3.9 at the time, I checked the docs and found out that it's a problem with the python version for the library, downgraded to Python 3.6 and voila! it worked.
Basically try downgrading to Python 3.6 and check.
Installing python libraries through Anaconda seems to work. I simply downloaded the installer and could later use the libraries globally. If someone has a better in-depth explanation, feel free to comment.
I was having the same message when trying to install a different package. I solved by removing the CommandLineTools and installing it again. The steps were:
sudo rm -r /Library/Developer/CommandLineTools
wait for command prompt...
xcode-select --install
This solved the issue for me.
I've tried upgrading pip install (it was already done), poked around in various pip and wheel related python files, but all that happens when i run the following command into my command prompt (cmd.exe)
pip install pip install numpy-1.13.3+mkl-cp36-cp36m-win_amd64.whl
This is the error I have
Requirement 'numpy-1.13.3+mkl-cp36-cp36m-win_amd64.whl' looks like a filename, but the file does not exist. numpy-1.13.3+mkl-cp36-cp36m-win_amd64.whl is not a supported wheel on this platform.
My system is, as far as I know, a 64 bit windows system
just pip install numpy will take care of downloading and installing necessary module versions. You dont need to mention module version
I found my solution, which was to install numpy
pip install numpy
I am trying to follow to the installation guide on tensorflow.org and have installed Python version 2 again for that reason using Homebrew.
When I run the installation as described
$ pip install https://storage.googleapis.com/tensorflow/mac/tensorflow-0.5.0-py2-none-any.whl
I get this error message:
tensorflow-0.5.0-py2-none-any.whl is not a supported wheel on this platform.
I am obviously doing something wrong, but have no idea. Any clues?
I do not want to use virtualenv, since anaconda already comes with its own environment management conda. When installing the newest version 0.6.0 directly with pip install, I had a similar error. It seemed to not resolve the dependencies correctly.
Here is what you can try:
Install anaconda
Create a new conda workspace
Download the specific protobuf version that tensorflow needs: https://pypi.python.org/pypi/protobuf/3.0.0a3
Install it via sudo easy_install ~/Downloads/protobuf-3.0.0a3-py2.7.egg
Install a numpy version greater than 1.08.x via conda install numpy
Download the 0.6.0 version of tensorflow: https://storage.googleapis.com/tensorflow/mac/tensorflow-0.6.0-py2-none-any.whl
Install via pip install ~/Downloads/tensorflow-0.6.0-py2-none-any.whl
When you install tensorflow from the whl file directly, it should tell you when dependencies are not there. It seems not to be able to resolve these conflicts independently. My setup had issues with protobuf and numpy. After installing them manually everything worked fine.
I hope this helps!
It seems to be a common issue. Try to install it in the virtualenv. Its a much better solution, as you can always easily set up a new version of tensorflow without conflicts.
VirutalEnv Tutorial:
http://tensorflow.org/get_started/os_setup.md#virtualenv-based_installation
On the Mac, I didn't have any problem installing tensorflow with the anaconda version of python: https://www.continuum.io/downloads
The anaconda version also provides science, math, engineering, and data analysis packages. A lot of people on https://www.kaggle.com/ seem to use this...just a thought.
I have both Python 2.7 and Python 3.4 (and have to have both because for the class I'm running, students have the option of using either). One student has used Python 2.7 and numpy for their project, but when I attempt to install numpy, it installs it to 3.4. I need to install it to 2.7.
I'm using numpy 1.9 from this site, which I'm told is also 2.7-specific: http://sourceforge.net/projects/numpy/files/NumPy/
However, nonetheless it still goes to the 3.4 folder. Copying it to Python 2.7 didn't work, obviously.
How do I do this?
I recommend installing with pip.
pip install numpy
If this doesn't work on windows then download the binary from http://www.lfd.uci.edu/~gohlke/pythonlibs/ and convert it to a wheel before installing.
pip install wheel
wheel convert path/to/binary
pip install numpy_wheel
Pip is recommended because you can uninstall.
To check where you are installing to
pip -V
You may have an environmental variable path to the wrong pip.
Assuming that you are using, or at least you should use pip to install the library. You can specify the python version to be installed by changing the suffix, e.g. pip-2.7 install numpy.
pip install numpy
pip-2.7 install numpy
pip-3.4 install numpy
As an alternative, in case that you do not want to use pip is to download and install the library using setup with a similar technique.
python setup.py install
python2.7 setup.py install
python3.4 setup.py install
Your PATH isn't setup correctly.
C:> where pip
Should tell you which pip it is trying to use, and it is likely whichever one it found on your PATH first...
So, instead, you will want to run it as
C:> C:\mypython2install\pip.exe install numpy
Or, setup your path correctly. See here
Just one other note on issues like this. I had a similar problem with Python 2.7 libraries not being found, because I had miniconda installed for a Python virtual environment that was hijacking calls to python from other programs. After deleting the minconda directory in my home the problem went away and python libraries that were properly installed were found again.
Note-This answer is particularly for Windows PC which has both Python2 & Pyhton3 installed on it.
Both the versions of Python has their different directories somewhat like
"C:\Python27\" ----for python2
"C:\Python35\" ---- for python3
*(or it depends on what path you chose while installing Python**)*
pip GENERALLY exist under the directory "C:\Python**\Scripts"
there you can find exe files like:
pip.exe/pip2.exe/pip2.7.exe ----for python2
pip3.exe/pip3.5.exe ----for python3
to install packages on python2:
use
Python27\Scripts\pip2.exe install package_name
(where the 1st argument is the path of exe file, it might differ for your system)
to install packages on python3:
use
Python35\Scripts\pip3.exe install package_name
there is no need to uninstall any version of python to achieve the task.
I have Python 2.7, and I have distutils installed.
I downloaded the latest version of Scipy for win 32.
For the life of me, I do not understand how to install it.
From the directions on the site, it states:
If you already have Python installed, the easiest way to install Numpy
and Scipy is to download and install the binary distribution from
Download.
I have followed the above directions and downloaded this.
I cannot figure what to do now!
How do I finish getting scipy installed?
It looks like you've downloaded the source distribution, which you would normally install by doing:
python setup.py install
However, without the proper C compiler environment and other libraries, it will probably fail. I'm guessing you really wanted to download the Windows binaries .
You have to drill a little further down in the sourceforge site to find it.
try downloading the windows binary ...
http://sourceforge.net/projects/scipy/files/scipy/0.11.0/scipy-0.11.0-win32-superpack-python2.7.exe/download
You'll be well off installing setuptools. Makes installing almost anything python-related a breeze!
e.g.
easy_install scipy
There's another one called pip.
easy_install pip
pip install scipy
just open windows command prompt and go to the directory you have installed Python. e.g
c:\python34>
Once there, just type python -m pip install scipy and press enter