# How to use LEfSe locally with conda?

**URL:** <https://forum.biobakery.org/t/how-to-use-lefse-locally-with-conda/4202>\
**Category:** LEfSe\
**Created:** [October 10, 2022, 7:40am UTC](https://forum.biobakery.org/t/how-to-use-lefse-locally-with-conda/4202 "2022-10-10T07:40:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Peter\_Revisnyei](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/peter_revisnyei/32/1712_2.png) [@Peter\_Revisnyei](https://forum.biobakery.org/u/Peter_Revisnyei)\
**Post date:** [October 10, 2022, 7:40am UTC](https://forum.biobakery.org/t/how-to-use-lefse-locally-with-conda/4202/1 "2022-10-10T07:40:32Z")

</div>

I would like to run lefse locally with conda. I have followed the [tutorial](https://github.com/biobakery/biobakery/wiki/lefse#2-lefse--conda-docker-vm-), but when I run this line from the tutorial example,  
`$ lefse_format_input.py hmp_aerobiosis_small.txt hmp_aerobiosis_small.in -c 1 -s 2 -u 3 -o 1000000`  
only a txt file opens with the following:

```auto
#!/bin/sh
'''exec' C:/Users/Peter/anaconda3/envs/biobakery_env/bin/python "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from lefse.lefse_format_input import format_input
if __name__ == ' __main__':
    sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
    sys.exit(format_input())

```

What could be the problem? I couldn’t find any topic with a similar issue on the forum. I am working on windows with python 3.10.6.

---

<div class="post-metadata">

**Author:** ![mishort](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/mishort/32/556_2.png) [@mishort](https://forum.biobakery.org/u/mishort)\
**Post date:** [October 26, 2022, 6:02pm UTC](https://forum.biobakery.org/t/how-to-use-lefse-locally-with-conda/4202/2 "2022-10-26T18:02:37Z")

</div>

Hi there,  
Sorry to hear you’ve been having issues–this made me realize we need to update our tutorial text re: installation, since currently the most updated version of LEfSe is found on PyPi, not conda or docker: [lefse · PyPI](https://pypi.org/project/lefse/)  
Try installing from there and running the tutorial again, and let me know if you’re still seeing issues after that.  
Thanks,  
Meg

---

<div class="post-metadata">

**Author:** ![Shwetha\_Kumar](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/shwetha_kumar/32/2618_2.png) [@Shwetha\_Kumar](https://forum.biobakery.org/u/Shwetha_Kumar)\
**Post date:** [December 26, 2023, 8:27pm UTC](https://forum.biobakery.org/t/how-to-use-lefse-locally-with-conda/4202/3 "2023-12-26T20:27:40Z")

</div>

> [@How to use LEfSe locally with conda?](https://forum.biobakery.org/t/how-to-use-lefse-locally-with-conda/4202):
>
> I would like to run lefse locally with conda. I have followed the [tutorial](https://github.com/biobakery/biobakery/wiki/lefse#2-lefse--conda-docker-vm-), but when I run this line from the tutorial example, $ lefse\_format\_input.py hmp\_aerobiosis\_small.txt hmp\_aerobiosis\_small.in -c 1 -s 2 -u 3 -o 1000000 only a txt file opens with the following: #!/bin/sh '''exec' C:/Users/Peter/anaconda3/envs/biobakery\_env/bin/python "$0" "$@" ' ''' # -\*- coding: utf-8 -\*- import re import sys from lefse.lefse\_format\_input import format\_input if \_\_name\_\_ == '\_\_main\_\_': sys.argv[0] …

Getting the same error as this post. Is there a workaround for this?

Shwetha

---

<div class="post-metadata">

**Author:** ![goober\_grape](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/goober_grape/32/2452_2.png) [@goober\_grape](https://forum.biobakery.org/u/goober_grape)\
**Post date:** [January 11, 2024, 5:01pm UTC](https://forum.biobakery.org/t/how-to-use-lefse-locally-with-conda/4202/4 "2024-01-11T17:01:28Z")

</div>

I didn’t have this specific issue, but maybe referring to these steps might help?

> [@Lefse galaxy and conda codes](https://forum.biobakery.org/t/lefse-galaxy-and-conda-codes/6099):
>
> Dear all, I am aware that Lefse galaxy module is having issues. However, I want to use conda codes to run the analysis. Could someone please share the codes and sample data to do the analysis? I tried to find codes from websites but they are very confusing. Any help is highly appreciated! Thank you

---

<div class="post-metadata">

**Author:** ![Shwetha\_Kumar](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/shwetha_kumar/32/2618_2.png) [@Shwetha\_Kumar](https://forum.biobakery.org/u/Shwetha_Kumar)\
**Post date:** [January 15, 2024, 1:00am UTC](https://forum.biobakery.org/t/how-to-use-lefse-locally-with-conda/4202/5 "2024-01-15T01:00:12Z")

</div>

Thank you, I followed the steps but this is a new error. I am following the tutorial [lefse · biobakery/biobakery Wiki · GitHub](https://github.com/biobakery/biobakery/wiki/lefse#2-lefse--conda-docker-vm-)

(lefse) C:\Users\shwet\Desktop\BCM\_Projects\CRC\_integromics\Analysis\Data\Deblur\99\_other\lefse\>lefse\_format\_input.py hmp\_aerobiosis\_small.txt hmp\_aerobiosis\_small.in -c 1 -s 2 -u 3 -o 1000000  
usage: lefse\_format\_input.py [-h] [–output\_table OUTPUT\_TABLE] [-f {c,r}] [-c [1…n\_feats]] [-s [1…n\_feats]]  
[-o float] [-u [1…n\_feats]] [-m {f,s}] [-n int] [-biom\_c BIOM\_CLASS]  
[-biom\_s BIOM\_SUBCLASS]  
INPUT\_FILE OUTPUT\_FILE  
lefse\_format\_input.py: error: the following arguments are required: INPUT\_FILE, OUTPUT\_FILE

---

<div class="post-metadata">

**Author:** ![goober\_grape](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/goober_grape/32/2452_2.png) [@goober\_grape](https://forum.biobakery.org/u/goober_grape)\
**Post date:** [January 22, 2024, 4:05pm UTC](https://forum.biobakery.org/t/how-to-use-lefse-locally-with-conda/4202/6 "2024-01-22T16:05:38Z")

</div>

Unfortunately, I am not sure how to help with this error. Sorry. I do hope you find a solution.

---

<div class="post-metadata">

**Author:** ![Kelsey\_Thompson](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/kelsey_thompson/32/65_2.png) [@Kelsey\_Thompson](https://forum.biobakery.org/u/Kelsey_Thompson)\
**Post date:** [January 29, 2024, 10:10pm UTC](https://forum.biobakery.org/t/how-to-use-lefse-locally-with-conda/4202/7 "2024-01-29T22:10:10Z")

</div>

Hi @Shwetha_Kumar,

I’m not exactly sure what is going wrong with this. Can you give me some additional information? Can you send me the LEfSe version that you are working with and the code you ran instead of the error? The error itself looks like LEfSe doesn’t know or can’t find your input file and output location - but that can be a general error as well.

Best,  
Kelsey
