Last active
May 4, 2024 23:40
-
-
Save stucka/3f7ec0aa2ba9327fdc52d72b40891166 to your computer and use it in GitHub Desktop.
Set up a new Python
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
My Python initial setup: | |
python -m pip install --upgrade pip | |
Is it sqwaking about managed configuration? If you're on Unix and feeling dumb: | |
cd /.config | |
mkdir pip | |
cd pip | |
nano pip.conf | |
... | |
Add this: | |
[global] | |
break-system-packages = true | |
pip install csvkit beautifulsoup4 dateparser eccodes-python emails flake8 Frozen-Flask ftputil google-api-python-client gspread jupyter matplotlib pandas pep8 pipenv pyOpenSSL pyquery pytesseract python-dateutil python-slugify pytz requests-oauthlib scipy selenium simplejson slackclient SQLAlchemy tqdm tweepy virtualenv black blacken-docs isort | |
Elex will puke on something called ujson. You need to get the binary from the link about six lines down, pip install the .whl file, and then try installing elex. | |
# pip install elex | |
pip install requests | |
Need to install Windows GIS stuff? | |
Start here: | |
https://www.lfd.uci.edu/~gohlke/pythonlibs/ | |
Look for and download: Fiona geopandas geopy numpy pyproj pyshape Shapely Cartopy cftime netCDF4 pyke iris plotly | |
Order of installation: | |
numpy | |
GDAL | |
pyshp | |
Shapely | |
Fiona | |
geopy | |
pyproj | |
geopandas | |
Cartopy | |
cftime | |
netCDF4 | |
pyke | |
iris | |
plotly | |
pip install iris-grib # Or not? | |
And then try testing in Python: | |
import numpy | |
# import GDAL | |
from osgeo import gdal | |
# import PyShp | |
import shapefile | |
from shapely.geometry import Point | |
# import Shapely | |
import fiona | |
# import Fiona | |
import geopy | |
import pyproj | |
import geopandas | |
then: | |
pip install pyiem |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment