I have been learning Python for a few months now. on the latest tutorial I have been using folium. when I import folium into VSCode, the word 'folium' is underlined in red. enter image description here
the script runs OK but, when i open VSCode in anaconda, it does not work. (the script also runs fine within PyCharm). Sorry for the silly question, I have spent a long time trying to figure out what i have done to cause this.
Any help would be appreciated.
Thanks in advance RWoood
Try to use'conda list
' to check if the folium
module is successfully installed in your conda environment.
If there is no folium
module in the conda list, use'pip install folium
' to install it. The premise is that the pip is from conda. To check the pip version, you can use'pip --version
'.
If there are still squiggles under the'folium
', please reload VSCode. You could use:Ctrl+Shift+p
,then input Developer:Reload Window
.
Note that when using the conda environment, it needs to be in its activated state.like this:
Reference: Conda environments.