How to instal python basemap on MacOS? - python

For the past 5 hours, I have been trying to install basemap module on my laptop. I have tried various methods and apparently they do not work. Firstly I have tried the one that was posted on stackoverflow 5 years ago using brew, but when you download zip file, it does not contain installer(that what terminal says). I was trying to install it directly from the terminal, also did not work. Official documentation on the installation of the package (https://matplotlib.org/basemap/users/installing.html) is complicated and I could not understand the steps. Can someone please tell me how to install it on MacOS?
P.S. I am working in the jupyter and currently trying to install the package using Anaconda

Related

Trouble installing python packages to target folder (ERROR: Can not combine '--user' and '--target')

I am going through "Automate the Boring Stuff" and I am using Mu as a text editor. I am trying to install a particular package called pyperclip.
Since Mu has its own Python environment, I am trying to install pyperclip into its /pkgs folder. I encounter the following error:
PS C:\Users\MYUSERNAME\AppData\Local\Mu\pkgs> pip install pyperclip --target "C:\Program Files\Mu\pkgs"
ERROR: Can not combine '--user' and '--target'
I have looked around on GitHub and previous posts on learnpython and I have not found similar troubles.
My major confusion is that it says I cannot combine --user but I did not type --user.
I have a feeling the solution is elementary, but I am learning python and how to work with terminals, so I would appreciate someone teaching me what I am doing wrong.
I found this question, whose solution is to reinstall Python from the website, not from the Microsoft app store, but I am pretty sure I downloaed Python from the website. Should I re-download or would that cause more complication?

Matplotlib installation for python 3.6. and windows 8

I do not understand exactly what I should do to install Matplotlib. I read a lot of posts but I do not have so much of fluent knowledge in programming so basically all of this that i read is quite confusing. Does anyone know what exactly should be done when having Python 3.6., visual code studio and Windows 8 to install Matplotlib?
A way that is simple using the original python from python.org with PATH installed is to use pip. You can check by opening cmd and entering python. If it is not a recognised command then you will have to reinstall python but make sure to tick the box at the start to enable PATH. once this is done you can install packages such as numpy and matplotlib.
In cmd type pip install Then the package you want to install from the PyPI website and using the EXACT name in the url before the version number. It should be like: /PACKAGE/VERSION.
eg. for matplotlib the url is /matplotlib/VERSION, so the name would be matplotlib. To install the latest version pip install matplotlib
If for some reason you want to uninstall a package you would do: pip uninstall PACKAGE. To install a specific version use pip install PACKAGE==VERSION where VERSION is the exact version name in the url. For full documentation visit Packaging Help.
Visual code studio is not necessary in this situation. This question is too broad and asking for a recommendation on software. Because of this, I went with the original python installation way and not any 3rd party software.

Downloading, Installing, Importing libraries in Spyder for Windows 10

I am trying to run PyEphem on Spyder.
I am extremely new to Python and libraries in general.
Currently it just says that I'm running Spyder in Python 2.7.
1) I would like to run the most up to date version of Python via Spyder and then import or install Pyephem (I'm still unclear on whether I have to install the library first or not), how would I do this? I look online but its very confusing because I don't know what I need to download when I'm presented with a list of links.
2) I would also like to see an explanation of how to properly download a libary like pyephem to be incorporated into use within spyder by typing import spyder.
3) I keep reading that I need pip, but I installed the latest version of Python from the website, ran the IDLE, and type 'pip install pyephem,' as directed, but it says 'install' is invalid syntax. Then when I read that I need to type 'python -m pip install -U pip' to update pip, that is invalid syntax too
I just realized over the past 30 minutes that I'm going to need to familiarize myself with how I download and then install and then import a library for use in Spyder, or some other program that I don't know of that may be better.

Installing Python Modules in Windows

I am new to Python and want to learn it. I am trying to install python27 modules but getting following error. I am using cmd to install these modules. May be I am doing something wrong and not aware of it.
I've just installed matplotlib yesterday, here are the basic procedure:
1 Install python 32bit if you want to make it easier to install matplotlib
2 download the exe installer from matplotlib project page and click install
3 done

Problems using pip to install libraries from github for python3.4 on an ubuntu 14.04 machine

Firstly I'm a first year computer science major so inexpeirence maybe my problem here but I can't find a solid solution after about 4 hours of googling and stumbling about.
I'm trying to install a library from github to use in python3.4 to play around with and learn about using api's. I'm using a Chromebook (Asus C300m) with ubuntu dual booted for coding.
I've tried various methods of using pip to install the library. It seems using the default pip command is broken for my version of ubuntu and throws an "incomplete read" error.
I tried using the get-pip.py file instead and that seems to work. But that installs the library only to the 2.7 version of python that came with the OS install not the 3.4 version I have to use for class and am currently learning in.
I also tried installing and using pip3 but that throws an "incomplete read" error just like the default pip command did.
I'm very willing to link my failed console commands but there have been so many I'm not sure which would be most helpful.
Thanks for any help anyone can provide.

Categories

Resources