What's the difference between
pip install numpy
and
pip install --upgrade numpy.
When I tried to use the first one to install the NumPy module in Python 3.5.2, it wasn't recognised, but when I used the second, there were no problems.
What's the difference between
pip install numpy
and
pip install --upgrade numpy.
When I tried to use the first one to install the NumPy module in Python 3.5.2, it wasn't recognised, but when I used the second, there were no problems.
Well, the first expression is used to install a new package, numpy in this case, at the last available version (if not specified)
If you want install a particular version, for example the 1.12.0b1, you can use the following command:
pip install numpy==1.12.0b1
Finally, the --upgrade or -U param, upgrades all specified packages to the newest available version. The handling of dependencies depends on the upgrade-strategy used.
upgrade-strategy is another parameter that you can find in the relative doc.
Since you don't have added information about errors, is difficult understand what is the real problem. I mean, the expression it wasn't recognised and there were no problems are not very clear. I suggest you to edit you question with some information.
Anyway, I suppose that you have already installed numpy on your pc, maybe in some past attempt. To verify this run the command:
pip freeze
and check if there is numpy in the installed package list.
If yes, I think that this is the reason because pip install numpy doesn't work and instead pip install --upgrade numpy yes. Basically you are not installing numpy but upgrading it, because is already installed.
Let me know.
First expression just verify if module installed. The installation will stop if module has outdated version. Second expression will install last released or upgrade already installed package to last released version. More info you can get from the docs