I know that there have been multiple posts on numpy and pyserial installation in python on stack overflow, but somehow none of them seem to work for me.
Possibly, i am not able to clearly understand what i have done and am stuck
I will list down the things i did that i think are relevant to solving the question.
A request- Please help me reach a solution before marking my question as a repeat.
Things you need to know- 64bit, Windows10, Python3.4, Python2.6.1, Python 2.7
Things i tried-
1) used the Official git repository for NUMPY -> tried to install it using the command prompt as:-
C:\Desktop\numpy-1.9.2\numpy-1.9.2> python setup.py install
[ At this point Python 3.4 was used because the statement "python" simply gave version 3.4 as a response ]
2) then tried using the unofficial site
3) tried using "pip"
4) tried a .whl file and .tar.gz file
5) Downloaded Visual C++ and tried reinstalling each
6) messed up with environment variables a couple of times
7) for pyserial, i was trying to get it in python 3.4 and i failed to do so consistently
8) uninstalled and installed python 2.7 and 3.4 multiple times while trying out various methods
9) finally i downloaded "conda" and tried using that. Set up more environment variables and now it is working in command prompt window but doesnt let me open the IDLE Can someone suggest a way to understand what i have done and possibly do it in a better way?
EDIT- Now when i type "python", it shows the following:-
Python 2.7.9 |Continuum Analytics, Inc.| (default, Dec 18 2014, 16:57:52) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. Anaconda is brought to you by Continuum Analytics. Please check out: http://continuum.io/thanks and https://binstar.org
I can import numpy in command prompt but cant open IDLE
You installed Anaconda, which is a nice starting point.
You are trying to manually compile, which is not necessary. Numpy is installed within the Anaconda environment by default.
So if you correctly installed Anaconda, the following will work:
conda update --prefix #PATHNAME #name <- directory where conda is installed.
in my case:
conda update --prefix C:\Users\NAME\Anaconda anaconda
Just ensure that you do not have conflicting python environments. Either conda or regular python install.
To check whether it worked, use the following:
(in command line)
python
>>>import numpy
>>>numpy.__version__
If it does not return '1.9.0' something went wrong, and I'd be happy to hear what happened.
As for the editor: if you have idle installed within your python environment (conda), you should be able to run it without a hitch.
If you are not particularly picky about which editor to use though, you can use the spyder module, which also comes with Anaconda by default.
You can run it from the windows start menu, or by typing spyder
in your command line.
For future and for all with Windows 10 64-bit do not install Python from python.org
The easiest way for win 10 to avoid manual steps is Conda package
- install Miniconda (I prefer) or Anaconda (contain Python 64 or 32bit)
in Powershell
conda install numpy
This way you can probably get all lib and packages - Anaconda includes 125 packages. If you don't wanna all of them Miniconda is just Python with the Conda package manager, so you install only what you need
I just did that:
- Uninstall your actual Python (mine: 3.6)
- Install all I needed with Miniconda
Numpy works :)
来源:https://stackoverflow.com/questions/31965205/python-numpy-installation-windows-10-64-bit