Unable to install Flatland

Hi,
I am unable to install the Flatland library on windows 10.

>pip install flatland-rl
Collecting flatland-rl
Collecting tox==3.5.2 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/8f/c3/64bade66e6188a0dc02689392d5c782a9eb6648b54ddc2db034aa495b6a2/tox-3.5.2-py2.py3-none-any.whl
Collecting Pillow==5.4.1 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/ec/ca/7af5b6628ecf770645f8cc3c9da3c2bb5c5ffc7384a9ff0666fdb818b4d5/Pillow-5.4.1-cp36-cp36m-win_amd64.whl
Collecting twine==1.12.1 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/26/7f/92c7083b66bc7ed32940cc0e25ae070c033d384d158617635222e7a08e92/twine-1.12.1-py2.py3-none-any.whl
Collecting xarray==0.11.3 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/14/e8/244fc7d31846e30f4edd4d1288f36761506f9bff0c954b76139448beebd0/xarray-0.11.3-py2.py3-none-any.whl
Requirement already satisfied: msgpack==0.6.1 in c:\mrugank_pc\softwares\python\anaconda3_5.1.0\lib\site-packages (from flatland-rl) (0.6.1)
Collecting svgutils==0.3.1 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/79/da/4f7a31a55c247e304a338716e75d761f3dc9b50b220fcfaad7398668367e/svgutils-0.3.1-py2.py3-none-any.whl
Collecting screeninfo==0.3.1 (from flatland-rl)
Collecting importlib-resources==1.0.2 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/2f/f7/b4aa02cdd3ee7ebba375969d77c00826aa15c5db84247d23c89522dccbfa/importlib_resources-1.0.2-py2.py3-none-any.whl
Collecting numpy==1.16.4 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/20/ed/e036d31a9b2c750f270cbb1cfc1c0f94ac78ae504eea7eec3267be4e294a/numpy-1.16.4-cp36-cp36m-win_amd64.whl
Collecting recordtype==1.3 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/60/9a/835ba329e31aa471a5597c733f7ca0136b3a0622ce01b9e66b40f5909da4/recordtype-1.3-py2.py3-none-any.whl
Collecting pytest-runner==4.2 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/72/a4/d7a5738a3096f22a98bec1609e237b250ebff04e5ea2930305d485337263/pytest_runner-4.2-py2.py3-none-any.whl
Collecting pyarrow==0.13.0 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/66/db/1ffeae1eb7150d6f7c36532ed2ebde15f67dc80d07bcd82ca534c3f519c0/pyarrow-0.13.0-cp36-cp36m-win_amd64.whl
Collecting CairoSVG==2.3.1 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/a0/f1/93e6ef3e994648f3a0d8cfff7931e100dd0fdae7b3f5a26a17e422a5da8e/CairoSVG-2.3.1-py3-none-any.whl
Collecting matplotlib==3.0.2 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/b1/56/569c83515c10146fd0aa09e086816b12e301d0811048e3354a6e9b77ba9a/matplotlib-3.0.2-cp36-cp36m-win_amd64.whl
Collecting importlib-metadata==0.17 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/7f/72/5e13a37e989bdb54ac3f52808e122cbd9b878ac980f932dc237ff64f8a00/importlib_metadata-0.17-py2.py3-none-any.whl
Collecting pytest==3.8.2 (from flatland-rl)
  Using cached https://files.pythonhosted.org/packages/08/e0/a4945a06380802264b3416d788ad607588c334662b6cd0af54144c45912d/pytest-3.8.2-py2.py3-none-any.whl
Collecting virtualenv>=1.11.2 (from tox==3.5.2->flatland-rl)
  Using cached https://files.pythonhosted.org/packages/c4/9a/a3f62ac5122a65dec34ad4b5ed8d802633dae4bc06a0fc62e55fe3e96fe1/virtualenv-16.6.1-py2.py3-none-any.whl
Requirement already satisfied: six<2,>=1.0.0 in c:\mrugank_pc\softwares\python\anaconda3_5.1.0\lib\site-packages (from tox==3.5.2->flatland-rl) (1.12.0)
Requirement already satisfied: pluggy<1,>=0.3.0 in c:\mrugank_pc\softwares\python\anaconda3_5.1.0\lib\site-packages (from tox==3.5.2->flatland-rl) (0.11.0)
Collecting toml>=0.9.4 (from tox==3.5.2->flatland-rl)
  Using cached https://files.pythonhosted.org/packages/a2/12/ced7105d2de62fa7c8fb5fce92cc4ce66b57c95fb875e9318dba7f8c5db0/toml-0.10.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=30.0.0 in c:\mrugank_pc\softwares\python\anaconda3_5.1.0\lib\site-packages (from tox==3.5.2->flatland-rl) (41.0.1)
Requirement already satisfied: filelock<4,>=3.0.0 in c:\mrugank_pc\softwares\python\anaconda3_5.1.0\lib\site-packages (from tox==3.5.2->flatland-rl) (3.0.10)
Requirement already satisfied: py<2,>=1.4.17 in c:\mrugank_pc\softwares\python\anaconda3_5.1.0\lib\site-packages (from tox==3.5.2->flatland-rl) (1.8.0)
Collecting requests-toolbelt>=0.8.0 (from twine==1.12.1->flatland-rl)
  Using cached https://files.pythonhosted.org/packages/60/ef/7681134338fc097acef8d9b2f8abe0458e4d87559c689a8c306d0957ece5/requests_toolbelt-0.9.1-py2.py3-none-any.whl
Requirement already satisfied: pkginfo>=1.4.2 in c:\mrugank_pc\softwares\python\anaconda3_5.1.0\lib\site-packages (from twine==1.12.1->flatland-rl) (1.5.0.1)
Requirement already satisfied: tqdm>=4.14 in c:\mrugank_pc\softwares\python\anaconda3_5.1.0\lib\site-packages (from twine==1.12.1->flatland-rl) (4.31.1)
Collecting readme-renderer>=21.0 (from twine==1.12.1->flatland-rl)
  Using cached https://files.pythonhosted.org/packages/c3/7e/d1aae793900f36b097cbfcc5e70eef82b5b56423a6c52a36dce51fedd8f0/readme_renderer-24.0-py2.py3-none-any.whl
Requirement already satisfied: requests!=2.15,!=2.16,>=2.5.0 in c:\mrugank_pc\softwares\python\anaconda3_5.1.0\lib\site-packages (from twine==1.12.1->flatland-rl) (2.21.0)
Requirement already satisfied: pandas>=0.19.2 in c:\mrugank_pc\softwares\python\anaconda3_5.1.0\lib\site-packages (from xarray==0.11.3->flatland-rl) (0.24.2)
Requirement already satisfied: lxml in c:\mrugank_pc\softwares\python\anaconda3_5.1.0\lib\site-packages (from svgutils==0.3.1->flatland-rl) (4.3.3)
Collecting cssselect2 (from CairoSVG==2.3.1->flatland-rl)
  Using cached https://files.pythonhosted.org/packages/12/e2/91fcd4cd32545beec6e11628d64d3e20f11b5a95dd1ccf3216fd69f176b7/cssselect2-0.2.1-py2.py3-none-any.whl
Collecting cairocffi (from CairoSVG==2.3.1->flatland-rl)
  Using cached https://files.pythonhosted.org/packages/0f/0f/7e21b5ddd31b610e46a879c0d21e222dd0fef428c1fc86bbd2bd57fed8a7/cairocffi-1.0.2.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Mrugank\AppData\Local\Temp\pip-install-0igt_fbi\cairocffi\setup.py", line 13, in <module>
        'cairocffi/ffi_build.py:ffi_pixbuf']
      File "C:\Mrugank_pc\Softwares\Python\Anaconda3_5.1.0\lib\site-packages\setuptools\__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "C:\Mrugank_pc\Softwares\Python\Anaconda3_5.1.0\lib\distutils\core.py", line 108, in setup
        _setup_distribution = dist = klass(attrs)
      File "C:\Mrugank_pc\Softwares\Python\Anaconda3_5.1.0\lib\site-packages\setuptools\dist.py", line 444, in __init__
        k: v for k, v in attrs.items()
      File "C:\Mrugank_pc\Softwares\Python\Anaconda3_5.1.0\lib\distutils\dist.py", line 281, in __init__
        self.finalize_options()
      File "C:\Mrugank_pc\Softwares\Python\Anaconda3_5.1.0\lib\site-packages\setuptools\dist.py", line 732, in finalize_options
        ep.load()(self, ep.name, value)
      File "C:\Mrugank_pc\Softwares\Python\Anaconda3_5.1.0\lib\site-packages\cffi\setuptools_ext.py", line 217, in cffi_modules
        add_cffi_module(dist, cffi_module)
      File "C:\Mrugank_pc\Softwares\Python\Anaconda3_5.1.0\lib\site-packages\cffi\setuptools_ext.py", line 49, in add_cffi_module
        execfile(build_file_name, mod_vars)
      File "C:\Mrugank_pc\Softwares\Python\Anaconda3_5.1.0\lib\site-packages\cffi\setuptools_ext.py", line 25, in execfile
        exec(code, glob, glob)
      File "cairocffi/ffi_build.py", line 28, in <module>
        ffi.cdef(constants._CAIRO_HEADERS)
    AttributeError: module 'constants' has no attribute '_CAIRO_HEADERS'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\Mrugank\AppData\Local\Temp\pip-install-0igt_fbi\cairocffi\

Also ‘Jupyter-Canvas-Widget’ is not available via pip for installation. I get following error.

>pip3 install jupyter-canvas-widget
Collecting jupyter-canvas-widget
  ERROR: Could not find a version that satisfies the requirement jupyter-canvas-widget (from versions: none)
ERROR: No matching distribution found for jupyter-canvas-widget

Trying to install via git also leads to same issue as mentioned above.

Kindly let me know the solution.

Thanks

Hi,

We have had some issues with Cairo and are trying to resolve this issue. We will get back to you as soon as possible with a fix.

Please try to install cairo seperatly under this Link

The widget is only used if you want to draw your own levels in Flatland using a Jupyter notebook.

You can install the widget through the instructions here :Jupyter Canvas Widget

I did the developer install on windows 10 and it worked. You need to run the commands in with administrative rights in the console.

Let me know if this worked. Happy to help otherwise.

Erik

Thanks!

I got it working by skipping the dependencies. I guess there’s some version mismatch that’s causing the trouble. I ran the following commands and it worked for me.

$ conda create python=3.6 --name flatland-rl
$ conda activate flatland-rl

$ pip install flatland-rl

Thanks for this wonderful pacakage…looking forward to learn a lot from this!! :slight_smile:

Has there been updates to the installation procedures?
Following the quick start guide, the installation ends successfully, but when I run “flatland-demo” (in Windows 10), I get the following error:
‘flatland-demo’ is not recognized as an internal or external command,
operable program or batch file.

Thanks!

@pmousavi: You are right. The flatland-demo script hasnt been added to the library yet. It will be shipped in the next release (due later today).

For now, you can safely ignore the fact that flatland-demo script doesnt exist in your path.

@mohanty: I get a similar error. Friday everything worked fine, now with the exact same code it fails on an Ubuntu16.04 machine.

Installed /tmp/pip-install-1zha10qo/flatland-rl/.eggs/toml-0.10.0-py3.6.egg
Traceback (most recent call last):
File “”, line 1, in
File “/tmp/pip-install-1zha10qo/flatland-rl/setup.py”, line 84, in
zip_safe=False,
File “/home/ubuntu/anaconda3/envs/flatland-rl/lib/python3.6/site-packages/setuptools/init.py”, line 144, in setup
_install_setup_requires(attrs)
File “/home/ubuntu/anaconda3/envs/flatland-rl/lib/python3.6/site-packages/setuptools/init.py”, line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File “/home/ubuntu/anaconda3/envs/flatland-rl/lib/python3.6/site-packages/setuptools/dist.py”, line 717, in fetch_build_eggs
replace_conflicting=True,
File “/home/ubuntu/anaconda3/envs/flatland-rl/lib/python3.6/site-packages/pkg_resources/init.py”, line 791, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (importlib-metadata 1.1.0 (/tmp/pip-install-1zha10qo/flatland-rl/.eggs/importlib_metadata-1.1.0-py3.6.egg), Requirement.parse(‘importlib-metadata<1,>=0.12’), {‘tox’})
----------------------------------------
ERROR: Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-install-1zha10qo/flatland-rl/

Hi @fabianpieroth

Try running pip install importlib-metadata==0.23 and then installing flatland using pip install flatland-rl

This should solve the issue. Please let us know if that does not work

This resolved the issue for me. Thank you very much for your help and the fast reply!