# Where to learn to put my package in anaconda

**URL:** <https://discourse.jupyter.org/t/where-to-learn-to-put-my-package-in-anaconda/13458>\
**Category:** JupyterLab\
**Created:** [March 16, 2022, 4:41pm UTC](https://discourse.jupyter.org/t/where-to-learn-to-put-my-package-in-anaconda/13458 "2022-03-16T16:41:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![CheeGan](https://avatars.discourse-cdn.com/v4/letter/c/3ab097/32.png) [@CheeGan](https://discourse.jupyter.org/u/CheeGan)\
**Post date:** [March 16, 2022, 4:41pm UTC](https://discourse.jupyter.org/t/where-to-learn-to-put-my-package-in-anaconda/13458/1 "2022-03-16T16:41:39Z")

</div>

I have developed a .py file for one calculation, then I use it to run for one set of parameters.

Then I copy the same .py to a second directory for a second set of parameters. Then  
along the way I make changes to .py to improve it.

But I would very much like to have a centralized .py in say, anaconda3/bin where  
it always has the latest .py file, even though it may break the run with earlier input parameters.

I think this is the serious software development thing, but how can I get started?

I don’t want to keep many different copies of .py all over the place and I do not know which is the  
latest one…

---

<div class="post-metadata">

**Author:** ![bollwyvl](https://yyz1.discourse-cdn.com/flex031/user_avatar/discourse.jupyter.org/bollwyvl/32/904_2.png) [@bollwyvl](https://discourse.jupyter.org/u/bollwyvl)\
**Post date:** [March 17, 2022, 6:03pm UTC](https://discourse.jupyter.org/t/where-to-learn-to-put-my-package-in-anaconda/13458/2 "2022-03-17T18:03:03Z")

</div>

The lightest-weight way to get to a “real” python package/command line tool in the conda space is probably [`flit`](https://flit.readthedocs.io/en/latest/): It supports ending up with a directory (under version control, ideally 😊) that contains just:

- your python file (which will become the installable name)
- a [`pyproject.toml`](https://flit.readthedocs.io/en/latest/pyproject_toml.html)

It supports [scripts](https://flit.readthedocs.io/en/latest/pyproject_toml.html#pyproject-project-scripts) which will ensure you get a command line entry.

Once you’ve got that, you’d be able to run

```auto
conda install -c conda-forge flit
flit install
my-command

```

and it should stay up-to-date, even after you change your `.py` file.
