Problem: after tossing all morning, openpyxl has been installed and uninstalled many times. The CMD clearly shows that the installation is successful, but an error is reported when the python file is imported
1. After installing openpyxl, the python file import has been reporting errors. After a morning’s efforts, I finally found the correct solution on the Internet
2. After installing openpyxl, you need to add components to pycharm. The steps are as follows
Help—> In findaction, enter the project interpreter and open the project interpreter
3. Click the “+” sign on the right
4. Enter the available packages interface, enter openpyxl in the input box, and click Install Package below. Later, you will be prompted with “package ‘openpyxl’ install successfully” below
5. At this time, if you import openpyxl in Python, you will not report an error
( Note: when other packages report errors (such as pandas), import them in DOS Python environment first. If no errors are reported; Then repeat the above steps in pycharm — project interpreter and install the corresponding package.)
Similar Posts:
- Error reporting of importing tensorflow package from pycharm
- Python uses xlwt length limit to report errors
- Problems and solutions of typeerror: ‘generator’ object is not subscriptable in openpyxl
- No Python interpreter configured for the project
- [Solved] Pycharm Build a flash environment Error: Non zero exit code (2)
- Python FAQ – error using openpyxl module: zipfile.BadZipFile : File is not a zip file
- Python learning notes – Import utils error
- BadZipFile: File is not a zip file [How to Solve]
- Error interpreter field is empty when installing pychar to create a new project. Run the python program
- Project interpreter not specified(eclipse+pydev)