Importing shutil

NOOB alert!! I have been using PYCharm for a while now to learn Python 3 and it has been great, but I now need to write a backup type script using shutil. But when I enter " import shutil, os" I get the dreaded red line underneath it and it looks like I can't import this module in PyCharm. can someone please point me in the right direction here? 

0
1 comment

Hi, here's some tips:

1. Find out if it's just an inspection issue or the interpreter issue. If the code actually runs, this is inspection issue, in that case try "File | Invalidate caches / restart" and delete / re-create the interpreter

2. If the script does not run and you get the import exception, try the same in python shell outside of IDE. shutil and os are build-ins and should work, but you probably have issue with your interpreter if it's reproduced outside of IDE as well.

0

Please sign in to leave a comment.