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: [Errno 2] No such file or directory: 'mix'

See original GitHub issue

I see this in the console:

Traceback (most recent call last):
  File "/Applications/Sublime Text.app/Contents/MacOS/sublime_plugin.py", line 210, in on_api_ready
    m.plugin_loaded()
  File "/Users/sam/Library/Application Support/Sublime Text 3/Packages/ElixirSublime/elixir_sublime.py", line 17, in plugin_loaded
    run_mix_task('deps.get')
  File "/Users/sam/Library/Application Support/Sublime Text 3/Packages/ElixirSublime/elixir_sublime.py", line 65, in run_mix_task
    startupinfo=startupinfo)
  File "./python3.3/subprocess.py", line 819, in __init__
  File "./python3.3/subprocess.py", line 1448, in _execute_child

FileNotFoundError: [Errno 2] No such file or directory: 'mix'

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:3
  • Comments:5

github_iconTop GitHub Comments

2reactions
diogocacommented, Nov 6, 2020

If you’re on Linux and installed Elixir with asdf, try to create a symbolic link under /usr/bin/ to shim files usually on /home/your_user/.asdf/shims/mix

try: sudo ln -s /home/your_user/.asdf/shims/mix /usr/bin/mix

1reaction
eksperimentalcommented, Sep 19, 2020

This issue happens when sublime is not launched from the terminal, so it is not aware of the PATH variable set by Bash or other terminal.

After so many hours spent I came with a really simple solution if all you need is to set the PATH manually. Create a plugin that will update PATH. https://robdodson.me/hacking-the-path-variable-in-sublime-text/

# https://robdodson.me/hacking-the-path-variable-in-sublime-text/
# If you are using Linux, save this plugin in ~/.config/sublime-text-3/Packages/User/Pathway.py
import os
  
# Sublime's default path is
# /usr/bin:/bin:/usr/sbin:/sbin
os.environ['PATH'] += ':'
os.environ['PATH'] += '/home/USERNAME/.asdf/shims:'
os.environ['PATH'] += '/home/USERNAME/.asdf/bin:'

print('PATH = ' + os.environ['PATH'])

Open up the console window to see and you will see "PATH = " with your env variable.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python error: FileNotFoundError: [Errno 2] No such file or ...
You would have to either os.path.join() correct directory path to it, or os.chdir() to the directory that the files reside in.
Read more >
How to fix FileNotFoundError Errno 2 no such file or directory
The error FileNotFoundError Errno 2 no such file or directory occurs when Python cannot find the specified file in the current directory.
Read more >
[Errno 2] No such file or directory" when loading custom split ...
Hi, I made a custom train/valid/test split dataset of the VCTK dataset after downsampling it to 16khz and taking only the first 44455...
Read more >
Errno 2 No such file or directory - Help - beets
But after reading your comment I run beet ls -p and I found a mix of paths on the library I wasn't aware...
Read more >
FileNotFoundError: [Errno 2] No such file or directory: - YouTube
Hello everyone, today's video is a short one on an error that I got during my last project. I have been short on...
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