As a python Xiaobai, what I want to see most is a simple tutorial, just like a fool operation. In recent days, I have found a simple way to solve the problem of Python path error reporting.
First of all, the owner does put the code. Py file and the original data. CSV in a folder, then open Spyder and click open file – & gt; Open code.py, but the error is as follows:
After trying to use several methods mentioned on the Internet, they all have no effect
In Spyder’s navigation bar, as shown in the figure below,
Click the folder symbol on the right side of the figure above (the part circled by the red box), the following selection box will pop up, and then select the folder where your code.py is located. At this point, the path has been changed.
Finally, make sure that the path of the following two red boxes is consistent, and the code can run smoothly
Original is not easy, feel useful, please like collection forward! Grow up together on the way of self-learning Python!
The end, the flowers~
Read More:
- python reads csv file is an error _csv.Error: iterator should return strings, not bytes (did you open the file in text)
- Python FileNotFoundError: [Errno 2] No such file or directory: ‘objects/epsilon.pkl
- Pandas read the CSV file error filenotf oundError:File b ‘***.csv’ does not exist
- When reading the CSV file with Python 3, the Unicode decodeerror: ‘UTF-8’ codec can’t decode byte 0xd0 in position 0: invalid con appears
- Solution to error opening trace file: no such file or directory (2) in Android
- Solution of header file StdAfx. H “no such file or directory” in Visual Studio
- FileNotFoundError: [Errno 2] No such file or directory: ‘./mnist_image_label/mnist_train_jpg_6000028
- A fatal error C1083 occurred when compiling C + + code under. Net: unable to open the include file: “xuhk”_ Jnihelloworld. H “: solution to no such file or directory error.
- When Python Django creates a database, can’t open file ‘ manage.py ‘: [Errno 2] No such file or directory
- Fatal error in CentOS: Python. H: no that file or directory
- How to solve the problem of “unable to open include file:” graphics. H “: no such file or directory”
- Cannot open include file: ‘io.h‘: No such file or directory
- fatal error: Python.h: No such file or directory
- In VS2010, the compiler cannot open the file “GL / glaux. H”: no such file or directory
- fatal error: Python.h: No such file or directory
- [tools] vscode debug report G + +. Exe no such file or directory fatal error no input files
- Error in header file when calling OpenGL to open obj file in vs2013: unable to open include file: “GL / glut. H”: no such file or directories
- Cannot chdir: no such file or directory solution
- fatal error: Python.h: No such file or directory compilation terminated.
- #During OpenGL development, fatal error C1083: can’t open include file: “GL / glut. H”: no such file or directory