# How Julia's virtual environment physically store the packages added in the environment?

**URL:** <https://discourse.julialang.org/t/how-julias-virtual-environment-physically-store-the-packages-added-in-the-environment/44314>\
**Category:** New to Julia\
**Tags:** question, package\
**Created:** [August 5, 2020, 9:34am UTC](https://discourse.julialang.org/t/how-julias-virtual-environment-physically-store-the-packages-added-in-the-environment/44314 "2020-08-05T09:34:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![DataPsycho](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datapsycho/32/16891_2.png) [@DataPsycho](https://discourse.julialang.org/u/DataPsycho)\
**Post date:** [August 5, 2020, 9:34am UTC](https://discourse.julialang.org/t/how-julias-virtual-environment-physically-store-the-packages-added-in-the-environment/44314/1 "2020-08-05T09:34:24Z")

</div>

Hi,  
I am trying to understand the environment in Julia which can be initiated in `]` Pkg mode with `activate .` But when I add a new package with a specific version with `add` where it physically installed? For example in Python if I create an environment with conda `conda create -n newenv python==3.7` the it create an environment in `..../miniconda3/envs/` and all the environments are there so If I add any package it will be installed in `..../miniconda3/envs/newenv/site-packages/` physically. But in case of Julia where the Packages installed physically or how to access them?

---

<div class="post-metadata">

**Author:** ![Iulian.Cioarca](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/iulian.cioarca/32/30166_2.png) [@Iulian.Cioarca](https://discourse.julialang.org/u/Iulian.Cioarca)\
**Post date:** [August 5, 2020, 9:44am UTC](https://discourse.julialang.org/t/how-julias-virtual-environment-physically-store-the-packages-added-in-the-environment/44314/2 "2020-08-05T09:44:08Z")

</div>

All the packages are physically downloaded in the `.julia/packages` folder, regardless of the environment you `add`ed them in.

When you `activate .` you tell julia to create a new environment in the current folder (`pwd()`) by creating a `Project.toml` and `Manifest.toml` file an save them in the same current folder. This file contains a list of the packages you `add`ed in this new environment, but physically they all reside in `.julia/packages` (even if you added multiple versions of the same package in different environments).

More info here:  
[https://julialang.github.io/Pkg.jl/v1/getting-started/](https://julialang.github.io/Pkg.jl/v1/getting-started/)

---

<div class="post-metadata">

**Author:** ![GunnarFarneback](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gunnarfarneback/32/1827_2.png) [@GunnarFarneback](https://discourse.julialang.org/u/GunnarFarneback)\
**Post date:** [August 5, 2020, 10:17am UTC](https://discourse.julialang.org/t/how-julias-virtual-environment-physically-store-the-packages-added-in-the-environment/44314/3 "2020-08-05T10:17:11Z")

</div>

Additionally you can use `pathof` to find exactly where a module has been loaded from.

---

<div class="post-metadata">

**Author:** ![DataPsycho](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/datapsycho/32/16891_2.png) [@DataPsycho](https://discourse.julialang.org/u/DataPsycho)\
**Post date:** [August 5, 2020, 10:28am UTC](https://discourse.julialang.org/t/how-julias-virtual-environment-physically-store-the-packages-added-in-the-environment/44314/4 "2020-08-05T10:28:57Z")

</div>

That Fantastic, just tried it with help: `pathof(m::Module)` any one in future will bump here can use pathof with module name `pathof(ProjectFlow)` to see the path.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 5, 2020, 10:36am UTC](https://discourse.julialang.org/t/how-julias-virtual-environment-physically-store-the-packages-added-in-the-environment/44314/5 "2020-08-05T10:36:22Z")

</div>

Note that in most cases, you _don’t_ need to know the path of the files that make up a package. The idea is that the package manager and code loading will take of this for you.

---

<div class="post-metadata">

**Author:** ![oxinabox](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oxinabox/32/206603_2.png) [@oxinabox](https://discourse.julialang.org/u/oxinabox)\
**Post date:** [August 5, 2020, 11:17am UTC](https://discourse.julialang.org/t/how-julias-virtual-environment-physically-store-the-packages-added-in-the-environment/44314/6 "2020-08-05T11:17:21Z")

</div>

if you want to access them directly, odds are that you should not be using `] add`  
but rather `] dev`, and for my perference i suggest `] dev --local` which will put them relative to your current Project.toml in `dev/<pkgname>`.

Though if you just want to look at the source,  
I suggest: using `@less` or `@edit` (but don’t change anything) in the REPL.  
Or usine `methods(...)` then typing the number of the one you want to look at and pressing ctrl+q.  
(or the same in response to a stack trace.)  
Or using Cthulu.jl
