# Pkg.add("PyCall") every time?

**URL:** <https://discourse.julialang.org/t/pkg-add-pycall-every-time/24136>\
**Category:** New to Julia\
**Tags:** pycall\
**Created:** [May 12, 2019, 8:34am UTC](https://discourse.julialang.org/t/pkg-add-pycall-every-time/24136 "2019-05-12T08:34:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![VincentTam](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vincenttam/32/8358_2.png) [@VincentTam](https://discourse.julialang.org/u/VincentTam)\
**Post date:** [May 12, 2019, 8:34am UTC](https://discourse.julialang.org/t/pkg-add-pycall-every-time/24136/1 "2019-05-12T08:34:57Z")

</div>

I’ve installed both Python (2.7 and 3) & Julia on Ubuntu 18.04 LTS, and I’ve installed the package PyCall by running `Pkg.add` in the REPL. However, every time I need `using PyCall`, an `ArgumentError` pops up and I’m told to `import Pkg; ...`. Is this the expected behaviour?

---

<div class="post-metadata">

**Author:** ![tkluck](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkluck/32/15769_2.png) [@tkluck](https://discourse.julialang.org/u/tkluck)\
**Post date:** [May 12, 2019, 11:04am UTC](https://discourse.julialang.org/t/pkg-add-pycall-every-time/24136/2 "2019-05-12T11:04:58Z")

</div>

Could you post the output of the status command here? Type `]` to get in `pkg> ` mode, then type `status` and enter:

```nohighlight
tkluck@tkluck-xps:~$ /usr/bin/julia
               _
   _ _ _(_)_ | Documentation: https://docs.julialang.org
  (_) | (_) (_) |
   _ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` | |
  | | |_| | | | (_| | | Version 1.0.3
 _/ |\ __'_|_|_|\__'_| | Ubuntu ⛬ julia/1.0.3+dfsg-4
|__/ |

(v1.0) pkg> status
    Status `~/.julia/environments/v1.0/Project.toml`
...

```

---

<div class="post-metadata">

**Author:** ![VincentTam](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vincenttam/32/8358_2.png) [@VincentTam](https://discourse.julialang.org/u/VincentTam)\
**Post date:** [May 12, 2019, 1:23pm UTC](https://discourse.julialang.org/t/pkg-add-pycall-every-time/24136/3 "2019-05-12T13:23:20Z")

</div>

Thanks for response.

There’s missing `PyCall` in `st`, but I remembered having run `Pkg.add("PyCall")` before, so the package `PyCall` has been installed under `~/.julia/packages/PyCall/`. I’ve tried another package (`LinearAlgebra`) not present in `st`, but `using LinearAlgebra` is fine. That’s seems quite mysterious that I posted here.

```julia
julia -q
(v1.1) pkg> st
    Status `~/.julia/environments/v1.1/Project.toml`
  [c52e3926] Atom v0.8.5
  [336ed68f] CSV v0.5.2
  [a93c6f00] DataFrames v0.18.2
  [31c24e10] Distributions v0.19.2
  [38e38edf] GLM v1.1.1
  [cd3eb016] HTTP v0.8.0
  [09f84164] HypothesisTests v0.8.0
  [7073ff75] IJulia v1.18.1
  [916415d5] Images v0.18.0
  [682c06a0] JSON v0.20.0
  [e5e0dc1b] Juno v0.7.0
  [91a5bcdd] Plots v0.24.0
  [d330b81b] PyPlot v2.8.1
  [6f49c342] RCall v0.13.2
  [ce6b1742] RDatasets v0.6.1
  [295af30f] Revise v2.1.4
  [2913bbd2] StatsBase v0.30.0
  [24249f21] SymPy v1.0.3

shell> ls -l ~/.julia/packages/PyCall/
total 8
drwxrwxr-x 6 vin100 vin100 4096 Oct 8 2018 rUul9
drwxr-xr-x 7 vin100 vin100 4096 Apr 24 17:20 ttONZ

julia> using PyCall
ERROR: ArgumentError: Package PyCall not found in current path:
- Run `import Pkg; Pkg.add("PyCall")` to install the PyCall package.

Stacktrace:
 [1] require(::Module, ::Symbol) at ./loading.jl:823

julia> using LinearAlgebra

julia> 

```

---

<div class="post-metadata">

**Author:** ![tkluck](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkluck/32/15769_2.png) [@tkluck](https://discourse.julialang.org/u/tkluck)\
**Post date:** [May 12, 2019, 1:27pm UTC](https://discourse.julialang.org/t/pkg-add-pycall-every-time/24136/4 "2019-05-12T13:27:52Z")

</div>

`LinearAlgebra` is standard library.

Every Julia version has its own package environment, including point releases. Is it possible you installed `PyCall` in, say, v1.0, not in v1.1 ?

(FWIW, I don’t know the reasoning behind that particular choice, I just know that it may be an explanation for what you’re seeing.)

---

<div class="post-metadata">

**Author:** ![VincentTam](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vincenttam/32/8358_2.png) [@VincentTam](https://discourse.julialang.org/u/VincentTam)\
**Post date:** [May 12, 2019, 1:44pm UTC](https://discourse.julialang.org/t/pkg-add-pycall-every-time/24136/5 "2019-05-12T13:44:55Z")

</div>

> [@tkluck](#):
>
> Is it possible you installed `PyCall` in, say, v1.0, not in v1.1 ?

Thanks for your question. 💡 You’re right about that!

---

<div class="post-metadata">

**Author:** ![giordano](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/giordano/32/2166_2.png) [@giordano](https://discourse.julialang.org/u/giordano)\
**Post date:** [May 12, 2019, 1:59pm UTC](https://discourse.julialang.org/t/pkg-add-pycall-every-time/24136/6 "2019-05-12T13:59:25Z")

</div>

> [@tkluck](#):
>
> Every Julia version has its own package environment

I think that patch releases share the same environment. So, for example, Julia 1.0.3 shares the environment with 1.0.0, 1.0.1, and 1.0.2, but this is different from the 1.1 series.

---

<div class="post-metadata">

**Author:** ![tkluck](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tkluck/32/15769_2.png) [@tkluck](https://discourse.julialang.org/u/tkluck)\
**Post date:** [May 12, 2019, 3:52pm UTC](https://discourse.julialang.org/t/pkg-add-pycall-every-time/24136/7 "2019-05-12T15:52:31Z")

</div>

Yes, I’m using “point release” wrong. Thanks for the correction!
