Comments (13)
I have developed mesa-geo using windows 10, so it used to be no problem. I'll see if I can recreate the problem on my end, but it will take a few days until I have the resources. You could see if it is possible to install gdal differently
from mesa-geo.
from mesa-geo.
from mesa-geo.
I have now succeeded (at least in installing mesa-geo; I have not yet tried to use it). The error message above appeared while the system was trying to install Fiona. Downloading two files from https://www.lfd.uci.edu/~gohlke/pythonlibs/, and using the following commands from within an Anaconda powershell terminal worked:
pip install C:\GDAL-3.1.4-cp38-cp38-win_amd64.whl
pip install C:\Fiona-1.8.18-cp38-cp38-win_amd64.whl
pip install mesa-geo
The last of these used the previously downloaded mesa_geo-0.2.0-py3-none-any.whl.
from mesa-geo.
Worth noting that, running Python3.8.3, under anaconda, I needed to make two changes to get the GeoSIR example to run:
- Copy the files geos.dll and geos_c.dll from \path\to\anaconda3\Lib\site-packages\shapely\DLLs to \path\to\anaconda3\Library\bin. I don't know why; adding to python's path did not work.
- Add the lines:
if sys.platform == 'win32':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
to get round a change in Python3.8, as recommended here: tornadoweb/tornado#2751.
from mesa-geo.
Glad you got it working! I'll leave this open until I can try this again myself on a clean environment and also to fix the visualization server
from mesa-geo.
I just reinstalled mesa-geo in a new virtual environment, and found that the file-copying noted above was not needed - the files geos.dll and geos_c.dll were already in \path\to\anaconda3\Library\bin. I also found that the two lines needing to be added to tornado\platform\asyncio.py are needed for the mesa example boids as well as mesa-geo examples.
from mesa-geo.
I installed mesa and mesa-geo on Windows 10 (still need to install GDAL and Fiona as described above to get the server to run without errors - this is a GeoPandas issue). The mesa schilling example runs, but the mesa-geo Schilling example does not. I get a map window, but the red and blue country outlines do not appear, nor do the controls. Installing with the same requirements.txt on Linux everything runs fine.
Note that the tornado\platform\asyncio.py update should not be needed with Tornado 6.1 (tornadoweb/tornado#2608 (comment)), but I tried it anyways with no joy.
Here is what I get on Windows 10:
I'm running Python 3.8. Here is my requirements.txt:
rrow==1.2.1
attrs==21.2.0
beautifulsoup4==4.10.0
binaryornot==0.4.4
certifi==2021.10.8
chardet==4.0.0
charset-normalizer==2.0.8
click==8.0.3
click-plugins==1.1.1
cligj==0.7.2
cookiecutter==1.7.3
cycler==0.11.0
Fiona==1.8.20
fonttools==4.28.2
geopandas==0.10.2
idna==3.3
install==1.3.4
Jinja2==3.0.3
jinja2-time==0.2.0
kiwisolver==1.3.2
libpysal==4.5.1
MarkupSafe==2.0.1
matplotlib==3.5.0
Mesa==0.8.9
-e git+https://github.com/corvince/mesa-geo.git@f5dc628c3674c7faa42c3a4d2053d6cc69f6fa5e#egg=mesa_geo
munch==2.5.0
networkx==2.6.3
numpy==1.21.4
packaging==21.3
pandas==1.3.4
Pillow==8.4.0
poyo==0.5.0
pyparsing==3.0.6
pyproj==3.3.0
python-dateutil==2.8.2
python-slugify==5.0.2
pytz==2021.3
requests==2.26.0
Rtree==0.9.7
scipy==1.7.3
setuptools-scm==6.3.2
Shapely==1.8.0
six==1.16.0
soupsieve==2.3.1
text-unidecode==1.3
tomli==1.2.2
tornado==6.1
tqdm==4.62.3
urllib3==1.26.7
from mesa-geo.
@josse7cz that is a symptom of 2 possible problems:
- You have a file called geopandas.py locally: https://stackoverflow.com/questions/49731879/attributeerror-module-pandas-has-no-attribute-version
- You just need to reinstall the dependencies, see ipython/ipyparallel#349
You should have posted your problem in a new issue, because while it is a Windows installation problem just like this issue, it has a different unrelated error message.
from mesa-geo.
How can I install mesa-geo as editable pip install -e git+https://github.com/projectmesa/mesa-geo.git#egg=mesa-geo
, when I try to execute this command it gives me the following error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\user\Desktop\RA\pythonProject20\venv\Scripts\python.exe' 'C:\Users\user\Desktop\RA\pythonProject20\venv\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.p
y' get_requires_for_build_wheel 'C:\Users\user\AppData\Local\Temp\tmpddvlq5v2'
cwd: C:\Users\user\AppData\Local\Temp\pip-install-o9mxfdrm\rasterio_fe13844a995745cd82fdd2205697e9f0
Complete output (2 lines):
INFO:root:Building on Windows requires extra options to setup.py to locate needed GDAL files. More information is available in the README.
ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable.
Initially I installed mesa geo by executing the following commands
pip install C:\GDAL-3.1.4-cp38-cp38-win_amd64.whl
pip install C:\Fiona-1.8.18-cp38-cp38-win_amd64.whl
pip install mesa-geo
But now I want to make changes in the root code so I want to install it so that I can edit the root code.
I am unable to install GDAL as editable.
Can anyone suggest me the steps I should take?
from mesa-geo.
@Harshpanday can you post in a different issue? Your use case is different from OP's. That said, I don't have access to a Windows machine, and so, can't help debug.
from mesa-geo.
The error seems to be related to rasterio. This isn't included in the latest release, but on the git version. So it is probably a problem with the installation of rasterio and not normal install vs editable install, but we need to verify this.
Also, yes, a separate issue would be great
from mesa-geo.
This is an old issue but I would like to use this as the ticket to track installation issues in Windows OS.
In our readme file we mentioned
On windows you should first use Anaconda to install some of the requirements with
conda install fiona pyproj rtree shapely
pip install mesa-geo
However, this was written 5 or 6 years ago. As I don't have access to any Windows machine, it would be great if someone could help check whether there is any issue in installing Mesa-Geo in Windows OS.
I'm also curious to know whether the conda install
is still required, or in other words, will there be any problem if we simply run pip install mesa-geo
in Windows.
from mesa-geo.
Related Issues (20)
- Spatial indexing of GeoAgents HOT 3
- Missing ModularVisualization in rainfall example? HOT 14
- Add citation information about Mesa-Geo
- Implement simpler Mesa-Geo namespace HOT 1
- v0.4.0 release HOT 3
- Improving `RasterLayer` HOT 4
- Add test for python 3.11
- Move mesa-geo examples into mesa-examples repo HOT 6
- ci: Replace flake8 with Ruff HOT 1
- cookiecutter for mesa-geo
- Uncaught ReferenceError in examples HOT 4
- automatically adjusting/zoomable map?
- v0.5.0 release HOT 1
- Update for Mesa v2.1 HOT 1
- frontend: python frontend for Mesa-Geo HOT 20
- tutorial for the geoschelling model (points & polygons)
- `GeoSpace.agents_at()` method doesn't work
- Some examples don't work in version 0.6.0 HOT 2
- Fix "undefined" in charts HOT 3
- ci: run on all pushes and PRs, publish to PyPI on tags
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mesa-geo.