# Embedding Julia in C++, packages can not be found from embedded script

**URL:** https://discourse.julialang.org/t/embedding-julia-in-c-packages-can-not-be-found-from-embedded-script/36306
**Category:** General Usage
**Tags:** embedding
**Created:** [March 21, 2020, 5:19pm UTC](https://discourse.julialang.org/t/embedding-julia-in-c-packages-can-not-be-found-from-embedded-script/36306 "2020-03-21T17:19:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gobrad](https://avatars.discourse-cdn.com/v4/letter/g/c37758/32.png) [@gobrad](https://discourse.julialang.org/u/gobrad)
#### Post date: [March 21, 2020, 5:19pm UTC](https://discourse.julialang.org/t/embedding-julia-in-c-packages-can-not-be-found-from-embedded-script/36306/1 "2020-03-21T17:19:45Z")

</div>

Hi

I am working on embedding Julia in a C++ application. Simple Julia programs work fine, I can call Julia functions, access variables etc.

But, trying to use any package in Julia, e.g. adding “using Measurements” or “using Plots” in the script being executed from C++ brings exception with error message: “Package XXX not found in current path. Run import Pkg;… to install the XXX package”. All packages I am trying to use are already installed and can be used if I start normal Julia command prompt.

I’ve tried setting JULIA\_LOAD\_PATH without success. If I print out the value of my LOAD\_PATH variable from embedded Julia script, I can see that the value is as expected („[“@”, “@v#.#”, “@stdlib”] “), plus my JULIA\_LOAD\_PATH if set.

I am on Windows, using JuliaPro 1.3.1-2. I can see that all packages are existing in my „C:\Users\<username\>.juliapro\JuliaPro\_v1.3.1-2\packages“ directory.

I did not find any information about package search path being different for embedded Julia than for standard command-line Julia prompt.

I would appreciate any help.

Best regards  
Goran

---

<div class="post-metadata">

### Author: ![gobrad](https://avatars.discourse-cdn.com/v4/letter/g/c37758/32.png) [@gobrad](https://discourse.julialang.org/u/gobrad)
#### Post date: [March 22, 2020, 8:31pm UTC](https://discourse.julialang.org/t/embedding-julia-in-c-packages-can-not-be-found-from-embedded-script/36306/2 "2020-03-22T20:31:12Z")

</div>

The problem was solved by uninstalling JuliaPro and installing plain Julia. In that case, everything works as expected. It seems that JuliaPro does some special handling of dirs/packages which prevents using those in embedded scripts.

Best regards  
Goran
