简体   繁体   English

找不到 >python scraper.py - 无法打开文件“scraper.py”:[Errno 2] 没有这样的文件或目录

[英]Cant find >python scraper.py - can't open file 'scraper.py': [Errno 2] No such file or directory

I'm following this tutorial - Dev Ed <3 Usually I complete his tutorial with no major problem.. but this one I'm stuck at 4:05 minute mark.我正在学习本教程- Dev Ed <3 通常我完成他的教程没有大问题..但是这个我被困在 4:05 分钟标记处。

I install all the packages as he does, but when I try to scrape like this :我像他一样安装了所有软件包,但是当我尝试像这样抓取时:

(venv) C:\Users\Mario\PycharmProjects\Bitanga>python scraper.py

I get this我明白了

C:\\Users\\Mario\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe: can't open file 'scraper.py': [Errno 2] No such file or directory C:\\Users\\Mario\\AppData\\Local\\Programs\\Python\\Python38-32\\python.exe: 无法打开文件 'scraper.py': [Errno 2] 没有那个文件或目录

Why?为什么? I have bs4 installed and requests.我已经安装并请求了 bs4。

Your computer can't find scraper.py .您的计算机找不到scraper.py Check your "C:\\Users\\Mario\\PycharmProjects\\Bitanga", is there scraper.py there?检查你的“C:\\用户\\马里奥\\ PycharmProjects \\ Bitanga”,是有scraper.py呢?

The error indicates that the file doesn't exist in that directory.该错误表明该文件不存在于该目录中。 Make sure you're in the correct directory where your file is located (eg C:\\\\Users\\Me\\Desktop ) using the cd command in terminal.使用终端中的cd命令确保您位于文件所在的正确目录中(例如C:\\\\Users\\Me\\Desktop )。 You can list the files in the current directory with the ls or dir command in terminal.您可以在终端中使用lsdir命令ls当前目录中的文件。

Could also be that your file is named something else.也可能是您的文件被命名为其他名称。 Maybe you have a typo in the file name?也许你的文件名有错别字? Have you saved the file before running it?你在运行之前保存了文件吗?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 python:无法打开文件&#39;hw.py&#39;:[Errno 2]没有这样的文件或目录 - python : cant open file 'hw.py': [Errno 2] No such file or directory 无法打开文件&#39;file.py&#39;:[Errno 2] 没有这样的文件或目录 - Can't open file 'file.py': [Errno 2] No such file or directory 无法打开文件“import.py”:[Errno 2] 没有这样的文件或目录 - can't open file 'import.py' :[Errno 2] No such file or directory 无法打开文件 'main.py': [Errno 2] 没有那个文件或目录 - Can't open file 'main.py': [Errno 2] No such file or directory 无法打开文件&#39;menu.py&#39;:[Errno 2]没有这样的文件或目录 - Can't open file 'menu.py': [Errno 2] No such file or directory 无法打开文件'.manage.py':[Errno 2] 没有这样的文件或目录 - can't open file '.manage.py': [Errno 2] No such file or directory 无法打开文件“audioAnalysis.py”:[Errno 2] 没有这样的文件或目录 - Can't open file 'audioAnalysis.py': [Errno 2] No such file or directory 无法打开文件 'app.py': [Errno 2] 没有那个文件或目录 - can't open file 'app.py': [Errno 2] No such file or directory 无法打开文件 &#39;manage.py&#39;: [Errno 2] 没有那个文件或目录 - Can't open file 'manage.py': [Errno 2] No such file or directory python:无法打开文件&#39;python DACscrap.py&&#39;:[Errno 2]没有这样的文件或目录…但是可以吗? - python: can't open file 'python DACscrap.py &': [Errno 2] No such file or directory… but it does?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM