Code Monkey home page Code Monkey logo

Comments (4)

JosecarlosRamirezB avatar JosecarlosRamirezB commented on May 18, 2024

Hi I'm also have the same problem.

I create a new enviroment and run the following comands:
conda install python
conda install pytorch torchvision torchaudio pytorch-cuda=11.6 -c pytorch -c nvidia
pip install ultralytics

Then when I believe that all is ok I run in a python script:
import ultralytics
and I got the following error:
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

from ultralytics.

sijie-Xu avatar sijie-Xu commented on May 18, 2024

嘿,兄弟,不需要进行这样操作,

有两种可能一种是环境变量的问题,你可以打开你的subprocess.py文件

位置在你的python环境中,比如 C:\User...\Python\Python39\lib\subprocess.py

找到报错的位置,去打印args变量,查看哪些环境变量出了问题
print(args) hp, ht, pid, tid = _winapi.CreateProcess(executable, args,

另一种方式是,找到subprocess.py中的class Popen
然后将shell=False 改为 shell=True

如图所示:
image

from ultralytics.

github-actions avatar github-actions commented on May 18, 2024

👋 Hello there! We wanted to give you a friendly reminder that this issue has not had any recent activity and may be closed soon, but don't worry - you can always reopen it if needed. If you still have any questions or concerns, please feel free to let us know how we can help.

For additional resources and information, please see the links below:

Feel free to inform us of any other issues you discover or feature requests that come to mind in the future. Pull Requests (PRs) are also always welcomed!

Thank you for your contributions to YOLO 🚀 and Vision AI ⭐

from ultralytics.

pderrenger avatar pderrenger commented on May 18, 2024

@sijie-Xu 嘿,感谢你的建议!

我建议你先尝试查看环境变量是否设置正确,然后看看是否有包含问题的地方。将print(args)添加到相应的位置,会有助于找到具体出错的地方。

如果这个方法不起作用,你可以尝试将shell=False改为shell=True,这可能会解决问题。

希望有所帮助!

from ultralytics.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.