question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FileNotFoundError: [WinError 2] The system cannot find the file specified

See original GitHub issue

I want to use anytree in anaconda in Win10 OS, but when i just run

root = Node("root")
s0 = Node("sub0", parent=root)
s0b = Node("sub0B", parent=s0)
s0a = Node("sub0A", parent=s0)
s1 = Node("sub1", parent=root)
s1a = Node("sub1A", parent=s1)
s1b = Node("sub1B", parent=s1)
s1c = Node("sub1C", parent=s1)
s1ca = Node("sub1Ca", parent=s1c)


RenderTreeGraph(root).to_picture("tree.png")

I get error like this

runfile('C:/Users/NWPU/.spyder-py3/temp.py', wdir='C:/Users/NWPU/.spyder-py3')
Traceback (most recent call last):

  File "<ipython-input-12-2380dbac90f7>", line 1, in <module>
    runfile('C:/Users/NWPU/.spyder-py3/temp.py', wdir='C:/Users/NWPU/.spyder-py3')

  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 710, in runfile
    execfile(filename, namespace)

  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 101, in execfile
    exec(compile(f.read(), filename, 'exec'), namespace)

  File "C:/Users/NWPU/.spyder-py3/temp.py", line 42, in <module>
    RenderTreeGraph(root).to_picture("tree.png")

  File "C:\ProgramData\Anaconda3\lib\site-packages\anytree\exporter\dotexporter.py", line 229, in to_picture
    check_call(cmd)

  File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 286, in check_call
    retcode = call(*popenargs, **kwargs)

  File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 267, in call
    with Popen(*popenargs, **kwargs) as p:

  File "C:\ProgramData\Anaconda3\lib\site-packages\spyder\utils\site\sitecustomize.py", line 209, in __init__
    super(SubprocessPopen, self).__init__(*args, **kwargs)

  File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 709, in __init__
    restore_signals, start_new_session)

  File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 997, in _execute_child
    startupinfo)

FileNotFoundError: [WinError 2] 系统找不到指定的文件。

could somebody help me out?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
c0fec0decommented, Jan 25, 2018

Hi,

graphviz is missing in your installation. Please ensure to have the graphviz package installed in your conda environment. Please run:

conda install graphviz

or create a conda environment with graphviz included.

HTH

0reactions
victorterancascommented, May 31, 2022

I install also graphviz and still have the error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

FileNotFoundError: [WinError 2] The system cannot find the file ...
As written you're looking for a file named 0.jpg in the working directory. You want to be looking in the directory you pass...
Read more >
FileNotFoundError: [WinError 2] The system cannot find the file ...
Hello guys, I am trying to run the script below in python and I keep getting this error [FileNotFoundError: [WinError 2] The system...
Read more >
FileNotFoundError: [WinError 2] the System Cannot Find the ...
When you get the FileNotFoundError: [WinError 2] The system cannot find the file specified error message, it means that Windows Explorer has ...
Read more >
[WinError 2] The system cannot find the file specified' mean in ...
Does that file exist at the file path location it is using? The path location must be specified in the file name you...
Read more >
FileNotFoundError: [WinError 2] The system cannot find the file ...
FileNotFoundError : [WinError 2] The system cannot find the file specified: 'C:\\Users\\[name]\\AppData\\Local\\pyinstaller\\bincache00_py310_64bit\\python310.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found