# V1.0 Pkg - Can't copy packages

**URL:** <https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764>\
**Category:** General Usage\
**Tags:** package\
**Created:** [December 17, 2018, 8:45pm UTC](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764 "2018-12-17T20:45:10Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen1](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@Glen1](https://discourse.julialang.org/u/Glen1)\
**Post date:** [December 17, 2018, 8:45pm UTC](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764/1 "2018-12-17T20:45:10Z")

</div>

I’m so frustrated.  
We’ve implemented our whole production environment in Julia and working really well, but can’t get v1.0 packages working.  
We are behind a firewall, so can’t add/download packages, so I currently have the following:

- v5.2
- compile and build packages and dependencies on an external server
- copy compiled packages to production server
- manually change dep.jl files and all compile paths in packages
- Change the relevant Julia run-time path variables for new directory  
– works perfectly

How on earth do we do this in v1.x.

- The documentation doesn’t seem to covert this, or is unclear
- Changing DEPOT\_PATH doesn’t really help

Failed Scenario:

- I’ve compiled GLM on another server and copied ~/.julia/\* to production directory
- changed DEPOT\_PATH to include new path
- I’d expect this to work… or at least be intuitive on where to make changes
- If I look in the copied path for GLM, I find it in:  
./packages/GLM  
./registries/General/G/GLM  
./compiled/v1.0/GLM  
and if I try to use GLM, I get:  
ERROR: IOError: stat: permission denied (EACCES)  
Stacktrace:  
[1] stat(::String) at ./stat.jl:68  
[2] samefile at ./stat.jl:311 [inlined]  
[3] macro expansion at ./logging.jl:305 [inlined]  
[4] macro expansion at ./logging.jl:318 [inlined]  
[5] stale\_cachefile(::String, ::String) at ./loading.jl:1330  
[6] \_require\_search\_from\_serialized(::Base.PkgId, ::String) at ./loading.jl:693  
[7] \_require(::Base.PkgId) at ./loading.jl:937  
[8] require(::Base.PkgId) at ./loading.jl:858  
[9] macro expansion at ./logging.jl:309 [inlined]  
[10] require(::Module, ::Symbol) at ./loading.jl:840

… I’m presuming that somehow Julia is looking in a wrong path, but where?  
I thought that maybe the underlying optimizer is looking for a C library, but the message doesn’t seem to reflect that…

The same is true for DataFrames, which, as far as I know, wouldn’t use any dependent C libraries

Any help would be great.

---

<div class="post-metadata">

**Author:** ![crbinz](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/crbinz/32/1919_2.png) [@crbinz](https://discourse.julialang.org/u/crbinz)\
**Post date:** [December 17, 2018, 8:47pm UTC](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764/2 "2018-12-17T20:47:47Z")

</div>

Here are a couple relevant topics that might have some helpful information:

> [@How does one set up a centralized Julia installation?](https://discourse.julialang.org/t/how-does-one-set-up-a-centralized-julia-installation/13922):
>
> I would like to start a thread about best practice for how to set up a centralized Julia installation in a cluster environment or local institution network. Hopefully, this will lead to a tutorial like write-up in the end. I want to focus on Julia 1.0 and, thus, Pkg(3). How does one set up a system wide Julia 1.0 installation, that is julia itself as well as commonly used packages? Requirements: Users should still be able to install packages not present in the central directories. As package…

> [@How to create a system administrator depot?](https://discourse.julialang.org/t/how-to-create-a-system-administrator-depot/14122):
>
> This is from the [Pkg section of the Julia doc](https://docs.julialang.org/en/v1/stdlib/Pkg/index.html) about the DEPOT\_PATH: How do I set up such a system administrator depot? Basically, what I want is to install a couple of packages system wide such that users don’t have to install them by themself. (This is in the context of [How does one set up a centralized Julia installation?](https://discourse.julialang.org/t/how-does-one-set-up-a-centralized-julia-installation/13922))

---

<div class="post-metadata">

**Author:** ![00vareladavid](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00vareladavid/32/23521_2.png) [@00vareladavid](https://discourse.julialang.org/u/00vareladavid)\
**Post date:** [December 17, 2018, 10:02pm UTC](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764/3 "2018-12-17T22:02:37Z")

</div>

That error in particular seems like either `DEPOT_PATH` was not set correctly or perhaps the files were copied over with incorrect permissions.

Also what is your workflow on the production server? Do you need something centralized with multiple users or only a single user?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [December 18, 2018, 4:01am UTC](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764/4 "2018-12-18T04:01:25Z")

</div>

What you do should work but something seems to be going wrong when the already precompiled files in `.julia/compiled` are getting loaded. Like @00vareladavid said, please check that the permission of the files are correct. To check if the `DEPOT_PATH` is correct, you can start julia in the production environment and do a `import Pkg; Pkg.status()`. `GLM` should be listed and it should not warn about being uninstalled if the `DEPOT_PATH` is set correctly.

Perhaps you can try not copying over the precompilation file (the files in `compiled`) and let them be regenerated on the production server and see what happens in that case.

---

<div class="post-metadata">

**Author:** ![Glen1](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@Glen1](https://discourse.julialang.org/u/Glen1)\
**Post date:** [December 18, 2018, 2:18pm UTC](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764/5 "2018-12-18T14:18:06Z")

</div>

Thanks — permissions were fine — seemed to be the already compiled/cached packages from the previous system — once files under /…/compiled/v1.0/\* were deleted, worked like a charm

---

<div class="post-metadata">

**Author:** ![Glen1](https://avatars.discourse-cdn.com/v4/letter/g/ee7513/32.png) [@Glen1](https://discourse.julialang.org/u/Glen1)\
**Post date:** [December 18, 2018, 2:18pm UTC](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764/6 "2018-12-18T14:18:12Z")

</div>

Amazing!!! THANK YOU

This worked:

1. copy .julia to \<new\_.julia\_path\> (and different system)
2. chmod -R 777 \<new\_.julia\_path\>
3. rm -Rf \<new\_.julia\_path\>/compiled/v1.0/\*
4. push!(LOAD\_PATH,“\<new\_.julia\_path\>”)
5. empty!(DEPOT\_PATH)  
push!(DEPOT\_PATH,“\<new\_.julia\_path\>”)
6. using Pkg  
Pkg.status()
7. using GLM, DataFrames, CSV

Glen

---

<div class="post-metadata">

**Author:** ![xiaodai](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/xiaodai/32/15937_2.png) [@xiaodai](https://discourse.julialang.org/u/xiaodai)\
**Post date:** [February 7, 2019, 4:34am UTC](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764/7 "2019-02-07T04:34:39Z")

</div>

Wonder if you can help me here.

I followed the instructions but I get this

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

```

Both my LOAD\_PATH and DEPOT\_PATH contains the new\_.julia\_path. But I copied the folders from Windows to Linux.

**Edit**

I realised that the issue was that I copied v1 library to v1.1. So I had to just copy the /environments/v1.0 to /environments/v1.1 and it worked!!!

---

<div class="post-metadata">

**Author:** ![jwu](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jwu/32/3775_2.png) [@jwu](https://discourse.julialang.org/u/jwu)\
**Post date:** [June 10, 2019, 7:43pm UTC](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764/8 "2019-06-10T19:43:30Z")

</div>

I have to manually modify the `environment/Manifest.toml` for development packages.

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [June 10, 2019, 8:23pm UTC](https://discourse.julialang.org/t/v1-0-pkg-cant-copy-packages/18764/9 "2019-06-10T20:23:15Z")

</div>

I don’t understand what that means.
