Problem setting up the playground for Fortran (Python installation)

This question does not concern Fortran per se but the GSoC project on creating a interactive playground for Fortran (see: GitHub - fortran-lang/playground: An interactive Fortran playground).

I am trying to get it working on Windows via an Unbuntu WSL installation. I have Python 3.8.10 installed and various other things, but for reasons I cannot fathom the command “pipenv install” fails. It complains about a missing module “virtualenv.seed.via_app_data” (yesterday there was a different message, a missing package “pipenv.pew”, if I remember correctly). “pipenv” and “virtualenv” have been installed, apparently correctly. I have looked at it together with @ashirrwad, but we made no progress.

@milancurcic, @everythingfunctional and @ashirrwad have been able to get it working, but they use a proper Linux system. Unfortunately, I do not have access to such a system, at least not one where I can install stuff at will.

Any help is appreciated, as it would be so nice to be able to experiment with this playground. (Note: in the near future this ought to be solved by the playground running on a webserver, but now it has to run locally)

1 Like

Sir , I had faced a similar problem for my college project 1 year back that time I had used this to get it to work. you may try it, not sure if this works now.
pip uninstall virtualenv
then pip install virtualenv==20.0.23
then try pipenv install .

Is Ubuntu WSL latest ? ( there had been a similar problem with debian also earlier)

Thanks and Regards,
Henil Shalin Panchal

Thanks! This solved the problem with pipenv indeed. The other steps in the start up procedure still cause me a problem, as I do not quite understand the relation with docker and the immediate error is “flask”, but at least I have moved forward a step.

1 Like

Sir, If you may copy paste the error, maybe I can resolve them, as I had worked with docker and flask earlier ( if I can be of any help).

Thanks and Regards,
Henil Shalin Panchal

Okay, but I first need to know if I should use the docker container to start it or my regular environment. I suspect the first, but the instructions are rather terse (not a complaint, @ashirrwad :slight_smile:) and clash with my limited understanding of the magic I am messing with.

flask will automatically start the docker image. No need to do it yourself, hence why it is not listed as a step in the README.

Ah, but the problem is that flask is not recognised as a command or program. So there I get stuck.

Okay, now that pipenv is working, I could get flask installed properly. Now the problem boils down to:

$ pipenv run flask run
Traceback (most recent call last):
  File "/home/markus/.local/share/virtualenvs/Backend-qjk8AQVR/bin/flask", line 8, in <module>
    sys.exit(main())
... (lots of stuff omitted)
    self._version = self._retrieve_server_version()
  File "/home/markus/.local/share/virtualenvs/Backend-qjk8AQVR/lib/python3.8/site-packages/docker/api/client.py", line 221, in _retrieve_server_version
    raise DockerException(
docker.errors.DockerException: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))

So, again a few steps forward :slight_smile:

Sir, this can be resolved by :

for WSL (Windows Subsystem for Linux) we need to enable ‘WSL Integration’ for required distro in Windows Docker Desktop (Settings → Resources-> WSL Integration → Enable integration with required distros).

then reload docker then turn docker off then turn it on.

It took me a while to find the settings in the Docker Desktop (it is the little gear icon), but with the information I found on the Internet and the information in the Docker application, I also understand that I need WSL 2 for this to work.

As far as I understand, WSL 2 does not work in my environment, because of the Windows 10 version we use. That means this is the end of what I can try.

1 Like