Closed Siaaa-3 closed 2 years ago
guys! I just solve this problem !! Not easy(cry
The reason Pycharm can not find "cityflow" module is that the module is installed in Docker bash( I don't know whether the discribtion is exactly ), and my Pycharm interpreter is local interpreter. So, all you need is to change your Pycharm interpreter to the one in the docker.
To achieve this, you can follow this tutorio: https://blog.csdn.net/qq_38342468/article/details/123570324?spm=1001.2014.3001.5506 It teach us how to config remote settings for the container, and then to connect Pycharm with your container.
In the last step of the tutorio, you need to find the position where the python interpreter is in your container, so that you can use the "import cityflow"!!
hope can help u !
I have followed the guide and now can run a cityflow container with "docker run -it cityflowproject/cityflow:latest".
According the guide, after start the container, "CityFlow is out-of-the-box along with miniconda with python3.6.", and it directly "import cityflow".
But, when I import, it says "ModuleNotFoundError: No module named 'cityflow'".
I start container in a virtural environment (created by anaconda, with python 3.9.7), and I import cityflow in Pycharm poject which runs in the same virtural enviralment .
I don't know how can I use cityflow. If u can give me some help, I will really appreciate u guys!!