# Issue with using SpecialFunctions.jl

**URL:** <https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906>\
**Category:** General Usage\
**Tags:** question\
**Created:** [February 9, 2021, 9:19am UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906 "2021-02-09T09:19:56Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![mdsa3d](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mdsa3d/32/20389_2.png) [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Post date:** [February 9, 2021, 9:19am UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906/1 "2021-02-09T09:19:56Z")

</div>

I am trying to use `exponential integral` function from `SpecialFunctions.jl`.

```julia
using SpecialFunctions
expinti(x)

```

When I execute this code the `expinti()` throws an error:

```julia
UndefVarError: expinti not defined

```

This function exist in the documentation ( [SpecialFunctions.jl/functions\_list.md at master · JuliaMath/SpecialFunctions.jl (github.com)](https://github.com/JuliaMath/SpecialFunctions.jl/blob/master/docs/src/functions_list.md)) but for some reason I cannot used it in my code.

May i know how to resolve this issue?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![sostock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sostock/32/5546_2.png) [@sostock](https://discourse.julialang.org/u/sostock)\
**Post date:** [February 9, 2021, 10:20am UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906/2 "2021-02-09T10:20:35Z")

</div>

Which version of `SpecialFunctions` are you using? `expinti` was added in version `1.0.0`. You can see the version by typing `st` in Pkg REPL mode.

---

<div class="post-metadata">

**Author:** ![mdsa3d](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mdsa3d/32/20389_2.png) [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Post date:** [February 9, 2021, 10:22am UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906/3 "2021-02-09T10:22:38Z")

</div>

@sostock, thanks for the response.

I am using the one from the general repository,

`SpecialFunctions version => v0.10.3`

May i know how to change this to the `1.0.0` ?

---

<div class="post-metadata">

**Author:** ![sostock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sostock/32/5546_2.png) [@sostock](https://discourse.julialang.org/u/sostock)\
**Post date:** [February 9, 2021, 10:47am UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906/4 "2021-02-09T10:47:14Z")

</div>

First, run `up` in Pkg REPL mode to upgrade everything. If it doesn’t upgrade `SpecialFunctions` to the latest version, there is likely some other package holding it back (by requiring an older version). You can run `add SpecialFunctions@v1.2.1` in Pkg REPL mode to add the latest version. If any of your required packages don’t support this version, the error message should tell you about them.

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [February 9, 2021, 11:26am UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906/5 "2021-02-09T11:26:19Z")

</div>

@sostock, fyi after activating a new project with `pkg> activate .`, to be able to install the latest version of SpecialFunctions, I am still getting the same error as the OP.  
_PS: Julia Version 1.6.0-beta1.0 on Win10 VS Code_

---

<div class="post-metadata">

**Author:** ![sostock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sostock/32/5546_2.png) [@sostock](https://discourse.julialang.org/u/sostock)\
**Post date:** [February 9, 2021, 11:38am UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906/6 "2021-02-09T11:38:31Z")

</div>

I didn’t try 1.6.0-beta1, but for me it works in 1.5.3 and 1.7.0-DEV (linux, no VS Code).

---

<div class="post-metadata">

**Author:** ![rafael.guerra](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rafael.guerra/32/216610_2.png) [@rafael.guerra](https://discourse.julialang.org/u/rafael.guerra)\
**Post date:** [February 9, 2021, 12:00pm UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906/7 "2021-02-09T12:00:26Z")

</div>

@sostock, my apologies. After exiting the Julia session and starting again, it worked fine. This precompilation/dependencies business is still a bit overwhelming to me.  
_PS: quoting a politician: “Our road is straight but the slope is steep” 🙂_

---

<div class="post-metadata">

**Author:** ![mdsa3d](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mdsa3d/32/20389_2.png) [@mdsa3d](https://discourse.julialang.org/u/mdsa3d)\
**Post date:** [February 10, 2021, 2:48am UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906/8 "2021-02-10T02:48:35Z")

</div>

Thanks for the suggestion, I tried your approach but apparently the `GLM package` is restricting the version for `SpecialFunctions` to `v0.10`. I just removed the `GLM` package and re-run the process, now it works fine.

May i ask does that mean i cannot use `GLM` package in my julia? Is there any way for them to exist together?

---

<div class="post-metadata">

**Author:** ![Oscar\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscar_smith/32/25343_2.png) [@Oscar\_Smith](https://discourse.julialang.org/u/Oscar_Smith)\
**Post date:** [February 10, 2021, 3:29am UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906/9 "2021-02-10T03:29:25Z")

</div>

I think you can use `GLM@master`. [https://github.com/JuliaStats/GLM.jl/pull/392](https://github.com/JuliaStats/GLM.jl/pull/392) adds support for version `1` of SpecialFunctions. Once 1.4.0 comes out of GLM, this will be solved for the release branch.

---

<div class="post-metadata">

**Author:** ![sostock](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sostock/32/5546_2.png) [@sostock](https://discourse.julialang.org/u/sostock)\
**Post date:** [February 10, 2021, 7:08am UTC](https://discourse.julialang.org/t/issue-with-using-specialfunctions-jl/54906/10 "2021-02-10T07:08:26Z")

</div>

You cannot use them in the same Project. If you don’t need both packages in the same code, you can use separate Project environments. Or you can follow Oscar\_Smith’s advice above and use `GLM@master` until a new `GLM` version is released.
