# Package LsqFit not found in current path - calling julia via PyJulia

**URL:** <https://discourse.julialang.org/t/package-lsqfit-not-found-in-current-path-calling-julia-via-pyjulia/34031>\
**Category:** General Usage\
**Tags:** pycall, python\
**Created:** [January 31, 2020, 3:19pm UTC](https://discourse.julialang.org/t/package-lsqfit-not-found-in-current-path-calling-julia-via-pyjulia/34031 "2020-01-31T15:19:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kethex](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kethex/32/12585_2.png) [@Kethex](https://discourse.julialang.org/u/Kethex)\
**Post date:** [January 31, 2020, 3:19pm UTC](https://discourse.julialang.org/t/package-lsqfit-not-found-in-current-path-calling-julia-via-pyjulia/34031/1 "2020-01-31T15:19:05Z")

</div>

Hello! I’m using Julia 1.4.  
I’m trying to make a Python program which calls upon Julia using [PyJulia] ([GitHub - JuliaPy/pyjulia: python interface to julia](https://github.com/JuliaPy/pyjulia)) and calls a .jl file I have stored in the same directory. This file uses a few installed Julia packages such as LsqFit and Statistics (installed via the REPL). However, whenever I run the Python program, Julia thinks I haven’t installed LsqFit when I very clearly have (it’s in Project.toml).

The error and stacktrace is below:

```julia
C:\ProgramData\Anaconda3\lib\site-packages\julia\core.py:689: FutureWarning: Accessing `Julia().<name>` to obtain Julia objects is deprecated. Use `from julia import Main; Main.<name>` or `jl = Julia(); jl.eval('<name>')`.
  FutureWarning,
Traceback (most recent call last):
  File "main.py", line 156, in <module>
    main()
  File "main.py", line 123, in main
    Main.include("processor/concentration.jl")
ImportError: Julia exception: LoadError: ArgumentError: Package LsqFit not found in current path:
- Run `import Pkg; Pkg.add("LsqFit")` to install the LsqFit package.

Stacktrace:
 [1] require(::Module, ::Symbol) at .\loading.jl:876
 [2] include at .\boot.jl:328 [inlined]
 [3] include_relative(::Module, ::String) at .\loading.jl:1094
 [4] include(::Module, ::String) at .\Base.jl:31
 [5] include(::String) at .\client.jl:431
 [6] #invokelatest#1 at .\essentials.jl:790 [inlined]
 [7] invokelatest(::Any, ::Any) at .\essentials.jl:789
 [8] _pyjlwrap_call(::Function, ::Ptr{PyCall.PyObject_struct}, ::Ptr{PyCall.PyObject_struct}) at C:\Users\user\.julia\packages\PyCall\ttONZ\src\callback.jl:28
 [9] pyjlwrap_call(::Ptr{PyCall.PyObject_struct}, ::Ptr{PyCall.PyObject_struct}, ::Ptr{PyCall.PyObject_struct}) at C:\Users\user\.julia\packages\PyCall\ttONZ\src\callback.jl:49
in expression starting at C:\Users\user\Downloads\fpga-scan-and-fit-master\fpga-scan-and-fit-master\processor\concentration.jl:1

```

Any help whatsoever would be greately appreciated!
