Reputation: 63619
After activating a virtualenv
source activate myVirtualEnv
how is pip install basemap
different from conda install basemap
? Both gave me different results, why is that?
pip install basemap
Collecting basemap
Could not find a version that satisfies the requirement basemap (from versions: )
Some externally hosted files were ignored as access to them may be unreliable (use --allow-external basemap to allow).
No matching distribution found for basemap
conda install basemap
Successfully installs
Upvotes: 11
Views: 8384
Reputation: 263
I solved this problem by example:
Because conda install js2xml does not work. On the other hand, conda install openpyxl does work. How do I know which is conda and which is pip. There is a list provided:
conda install js2xml
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
- js2xml
Current channels:
- https://repo.anaconda.com/pkgs/main/linux-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/linux-64
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/linux-64
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/pro/linux-64
- https://repo.anaconda.com/pkgs/pro/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
Sames goes for an error when trying to run python script when you added "import js2xml" whilst using acaconda/conda: ModuleNotFoundError: No module named 'js2xml'
If you use conda or anaconda, do NOT install pip by typing "sudo apt install pip".
Upvotes: 0
Reputation: 127190
Pip installs from PyPI. There are no releases of the basemap package on PyPI, it is just a simple registration page pointing at the real download location (SourceForge).
Conda pulls from its own repository, typically with convenience builds of libraries common to the community Conda is aimed at. Conda's repository has a version of the basemap package available for installation, so it succeeds.
This is not to say that Pip is "worse" than Conda in this instance, as you could easily download the package and install it with pip locally. This particular library has just opted to not add releases to PyPI.
Upvotes: 14