# Getting passed env: python No such file or directory

**URL:** <https://discuss.python.org/t/getting-passed-env-python-no-such-file-or-directory/43875>\
**Category:** Python Help\
**Created:** [January 22, 2024, 3:36pm UTC](https://discuss.python.org/t/getting-passed-env-python-no-such-file-or-directory/43875 "2024-01-22T15:36:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtd](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@dtd](https://discuss.python.org/u/dtd)\
**Post date:** [January 22, 2024, 3:36pm UTC](https://discuss.python.org/t/getting-passed-env-python-no-such-file-or-directory/43875/1 "2024-01-22T15:36:18Z")

</div>

I use python as rather than perl or shell script. I just installed FreeBSD 13.2, the same (or so I thought) as my base system.

---

<div class="post-metadata">

**Author:** ![jamestwebber](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jamestwebber/32/12799_2.png) [@jamestwebber](https://discuss.python.org/u/jamestwebber)\
**Post date:** [January 22, 2024, 3:49pm UTC](https://discuss.python.org/t/getting-passed-env-python-no-such-file-or-directory/43875/2 "2024-01-22T15:49:00Z")

</div>

Is there a question or issue? I don’t really understand the situation.

---

<div class="post-metadata">

**Author:** ![dtd](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@dtd](https://discuss.python.org/u/dtd)\
**Post date:** [January 22, 2024, 7:19pm UTC](https://discuss.python.org/t/getting-passed-env-python-no-such-file-or-directory/43875/3 "2024-01-22T19:19:13Z")

</div>

running a script produces the env error making python unusable on this system. The only work around I have found is to use perl which I have to relearn,

---

<div class="post-metadata">

**Author:** ![jamestwebber](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/jamestwebber/32/12799_2.png) [@jamestwebber](https://discuss.python.org/u/jamestwebber)\
**Post date:** [January 22, 2024, 7:33pm UTC](https://discuss.python.org/t/getting-passed-env-python-no-such-file-or-directory/43875/4 "2024-01-22T19:33:16Z")

</div>

You haven’t provided very much information so it’s hard to know what the problem is.

As far as I understand: you have a new system with FreeBSD 13.2. When you try to use `python` you get the error “No such file or directory”. Is that the case?

It sounds like python is not installed on your system. I would look into the documentation for FreeBSD to figure out how they recommend installing it.

---

<div class="post-metadata">

**Author:** ![dtd](https://avatars.discourse-cdn.com/v4/letter/d/97f17d/32.png) [@dtd](https://discuss.python.org/u/dtd)\
**Post date:** [January 22, 2024, 7:46pm UTC](https://discuss.python.org/t/getting-passed-env-python-no-such-file-or-directory/43875/5 "2024-01-22T19:46:11Z")

</div>

in FreeBSD programs are installed using pkg. Been using python for a decade or so. The issue is setting the environment which I want to be the entire system. Failing that making the environment /home/me.  
clearly I am not getting my problem across. So thank you. I will continue with perl for now.

---

<div class="post-metadata">

**Author:** ![kknechtel](https://avatars.discourse-cdn.com/v4/letter/k/e47c2d/32.png) [@kknechtel](https://discuss.python.org/u/kknechtel)\
**Post date:** [January 22, 2024, 11:20pm UTC](https://discuss.python.org/t/getting-passed-env-python-no-such-file-or-directory/43875/6 "2024-01-22T23:20:16Z")

</div>

> [@dtd](#):
>
> clearly I am not getting my problem across.

Here is a quick guide for explaining the problem clearly:

1. Open a new terminal and use whatever commands are necessary to demonstrate the problem. For example, if we need to see the `PATH` environment variable, then use `echo "$PATH"` or whatever else is appropriate for your system. Since the primary problem occurs when you try to use Python, show a Python command-line invocation that causes the problem - whether that’s just `python`, `python path/to/myscript.py`, directly running an executable script with something like `./myscript.py`, etc. - whatever _actually is required, in your situation_, to cause the problem.

2. **Copy and paste** the relevant part of the terminal session - **both commands and output/errors** - to a new forum post, and [format it the same way as multi-line code, following the explanation in the pinned thread](https://discuss.python.org/t/about-the-python-help-category/42). Make sure that we can see complete error messages, as they are output - _don’t_ try to explain or describe what it says in your own words.

3. If the problem requires specific code in a specific Python file, then show that as well - label each file with its name (and path, if they need to be arranged a specific way), and show its contents. But first, try to make each file contain the **minimum necessary** to demonstrate the problem.

> [@dtd](#):
>
> The issue is setting the environment which I want to be the entire system. Failing that making the environment /home/me.

This is hard to understand, because it seems to depend on “environment” meaning something that it doesn’t actually mean here (and which I can’t guess).
