Giter Club home page Giter Club logo

Comments (13)

sowdm avatar sowdm commented on June 18, 2024

Info about install of geopandas including key Windows install detals: https://geopandas.org/en/stable/getting_started/install.html

image

from openpolicedata.

sowdm avatar sowdm commented on June 18, 2024

More info on Fiona for Windows: https://stackoverflow.com/questions/50876702/cant-install-fiona-on-windows

gdal should be installed in the same way before Fiona.

Can we force use of these whls on Windows in our requirements and/or setup file?

from openpolicedata.

sowdm avatar sowdm commented on June 18, 2024

I just did a fresh install on a new Windows machine and successfully tested the code. My above comment is probably best addressed by telling Windows users to install Anaconda or Miniconda. geopandas is available by conda install so avoids the issue.

from openpolicedata.

sowdm avatar sowdm commented on June 18, 2024

Installed and tested clean Windows install in the above commit. Used the following commands:

conda install --file dev/requirements-conda.txt --file dev/requirements-test.txt

Install the necessary dependency packages that are NOT available on conda.

pip install -r dev/requirements-pip.txt

@potto216 Assigning to you since you are handling the Linux install. I would probably recommend doing that install without conda so that it should work both ways on Linux.

from openpolicedata.

potto216 avatar potto216 commented on June 18, 2024

Getting an error when installing on Ubuntu with

ERROR: Failed building wheel for gssap
...
error: invalid command 'bdist_wheel'
...
 error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

Need to have as prereqs
apt install build-essential
and
apt install libssl-dev libffi-dev python3-dev
and possibly others, but narrowing that down.

from openpolicedata.

potto216 avatar potto216 commented on June 18, 2024

Also for the pytest runs
linux-vm-install-17-test.txt
The first regular test ran but the slow test was killed. Need to investigate that.

from openpolicedata.

sowdm avatar sowdm commented on June 18, 2024

@potto216 Were the issues that you had related to geopandas at all? Would it make sense to make that package optional? I think it would be an easy thing to do

from openpolicedata.

potto216 avatar potto216 commented on June 18, 2024

Found on Ubuntu 20.4 installing the following packages works

sudo apt install build-essential git python3-pip python3-dev libkrb5-dev libssl-dev libffi-dev python3-testresources

recommended to reboot so the ~/.local/bin path is added. Then:

git clone [email protected]:sowdm/openpolicedata.git
cd openpolicedata/
pip install -r requirements.txt

I'll update the docs today

from openpolicedata.

potto216 avatar potto216 commented on June 18, 2024

I'll update the readme.md in https://github.com/sowdm/openpolicedata/tree/readme-update-issue-18 with the install and say for ubuntu, tested on 20.4. Test with miniconda.
See if using conda channel https://support.esri.com/en/technical-article/000022005 avoids apt-get install

from openpolicedata.

potto216 avatar potto216 commented on June 18, 2024

Using miniconda this works with Ubuntu 20.4. We can talk tomorrow about if I should have an install file and th ewriteup.

#Ubuntu 20.4 may need
sudo apt install curl git

python3 --version
#For Python 3.8
curl -O  https://repo.anaconda.com/miniconda/Miniconda3-py38_4.11.0-Linux-x86_64.sh
bash Miniconda3-py38_4.11.0-Linux-x86_64.sh

#restart the shell 

git clone [email protected]:openpolicedata/openpolicedata.git

cd openpolicedata

conda create -n opd
conda activate opd
conda install geopandas pandas numpy requests pyproj 
conda install pytest
conda install -c esri arcgi
pip install sodapy

python -m pytest

from openpolicedata.

potto216 avatar potto216 commented on June 18, 2024

I'll try conda list install with the top level packages. I'll not add pytest

from openpolicedata.

potto216 avatar potto216 commented on June 18, 2024

Running this command conda env create --name opd2 -f environment.yml
created the environment named opd2 using the below file.

#-----------environment.yml START----------------------
channels:
  - esri
  - pypi
dependencies:
  - arcgis
  - geopandas
  - numpy
  - pandas
  - pyproj
  - requests
  - pip
  - pip:
    # regular pip packages
    -  sodapy
#-----------environment.yml END----------------------

Pytest installed with conda install pytest
I'll open an issue to do a PR.

Results below. BTW - looks like a bug (DeprecationWarning) from not escaping the regular expression or using a r"" string. I'll fix it when I push this change.

(opd2) user@ubuntu:~/t1/openpolicedata$ python -m pytest
============================================================================================ test session starts =============================================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/user/t1/openpolicedata
collected 28 items

tests/test_data.py .......ss                                                                                                                                                                           [ 32%]
tests/test_data_loaders.py ...                                                                                                                                                                         [ 42%]
tests/test_datasets.py ................                                                                                                                                                                [100%]

============================================================================================== warnings summary ==============================================================================================
openpolicedata/_datasets.py:67
  /home/user/t1/openpolicedata/openpolicedata/_datasets.py:67: DeprecationWarning: invalid escape sequence \d
    p = re.compile("(MapServer|FeatureServer)/\d+")

tests/test_data.py: 64 warnings
tests/test_data_loaders.py: 3 warnings
  /home/user/miniconda3/envs/opd2/lib/python3.8/site-packages/arcgis/gis/_impl/_con/_connection.py:437: DeprecationWarning: Using 'method_whitelist' with Retry is deprecated and will be removed in v2.0. Use 'allowed_methods' instead
    max_retries=Retry(

tests/test_data.py: 192 warnings
tests/test_data_loaders.py: 9 warnings
  /home/user/miniconda3/envs/opd2/lib/python3.8/site-packages/requests_kerberos/kerberos_.py:385: DeprecationWarning: PY_SSIZE_T_CLEAN will be required for '#' formats
    self.cbt_struct = kerberos.channelBindings(application_data=cbt_application_data)

tests/test_data.py::TestProduct::test_get_years[None]
  /home/user/miniconda3/envs/opd2/lib/python3.8/site-packages/notebook/notebookapp.py:52: DeprecationWarning: zmq.eventloop.ioloop is deprecated in pyzmq 17. pyzmq now works with default tornado and asyncio eventloops.
    ioloop.install()

-- Docs: https://docs.pytest.org/en/stable/warnings.html
========================================================================== 26 passed, 2 skipped, 270 warnings in 220.21s (0:03:40) ===========================================================================
(opd2) user@ubuntu:~/t1/openpolicedata$

from openpolicedata.

potto216 avatar potto216 commented on June 18, 2024

The conda channel is included by default in environment.yml and can be excluded by adding nodefaults to the channels list.

from openpolicedata.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.