# Permission issue while building wheels for various python packages

**URL:** <https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822>\
**Category:** Multi CPU Architecture\
**Tags:** multi-cpu-arch\
**Created:** [March 26, 2020, 2:04pm UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822 "2020-03-26T14:04:16Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![odidev](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/odidev/32/4162_2.png) [@odidev](https://travis-ci.community/u/odidev)\
**Post date:** [March 26, 2020, 2:04pm UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/1 "2020-03-26T14:04:17Z")

</div>

**While adding Arm64 jobs in travis.yml for Matplotlib package, getting permission issue while building wheel for pandas.**  
below is respectiveTravis log, please have a look:  
[https://travis-ci.com/github/ossdev07/matplotlib/jobs/301093133](https://travis-ci.com/github/ossdev07/matplotlib/jobs/301093133)

Getting following Error:  
Building wheels for collected packages: coverage, tornado, pandas, pandocfilters, backcall, pyzmq, MarkupSafe, pyrsistent  
WARNING: Building wheel for coverage failed: [Errno 13] Permission denied: ‘/home/travis/.cache/pip/wheels/b1’  
WARNING: Building wheel for tornado failed: [Errno 13] Permission denied: ‘/home/travis/.cache/pip/wheels/88’  
WARNING: Building wheel for pandas failed: [Errno 13] Permission denied: ‘/home/travis/.cache/pip/wheels/23’  
WARNING: Building wheel for pandocfilters failed: [Errno 13] Permission denied: ‘/home/travis/.cache/pip/wheels/f6’  
WARNING: Building wheel for backcall failed: [Errno 13] Permission denied: ‘/home/travis/.cache/pip/wheels/19’  
WARNING: Building wheel for pyzmq failed: [Errno 13] Permission denied: ‘/home/travis/.cache/pip/wheels/48’  
WARNING: Building wheel for MarkupSafe failed: [Errno 13] Permission denied: ‘/home/travis/.cache/pip/wheels/0c’  
WARNING: Building wheel for pyrsistent failed: [Errno 13] Permission denied: ‘/home/travis/.cache/pip/wheels/be’  
Failed to build coverage tornado pandas pandocfilters backcall pyzmq MarkupSafe pyrsistent  
ERROR: Could not build wheels for pandas which use PEP 517 and cannot be installed directly  
The command "# Install dependencies from PyPI.  
python -mpip install --upgrade $PRE -r requirements/testing/travis\_all.txt $EXTRAREQS $PINNEDVERS  
" failed and exited with 1 during .

**Expected outcome**  
`As it is not giving any issue on AMD64 architecture, it should not give any error for ARM64 as well.`

**Matplotlib version**  
`Latest`

---

<div class="post-metadata">

**Author:** ![noloader](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/noloader/32/2971_2.png) [@noloader](https://travis-ci.community/u/noloader)\
**Post date:** [March 27, 2020, 10:31pm UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/2 "2020-03-27T22:31:36Z")

</div>

The ARM64 environment was having problems on Thursday (yesterday). AMD64, PPC64 and s390x were OK.

I think the Travis team got the issue fixed. Or at least I stopped seeing the failures on Friday (today).

Maybe you can restart a failed job and see if the issue is resolved.

---

<div class="post-metadata">

**Author:** ![odidev](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/odidev/32/4162_2.png) [@odidev](https://travis-ci.community/u/odidev)\
**Post date:** [April 1, 2020, 1:06pm UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/3 "2020-04-01T13:06:23Z")

</div>

@noloader I am still facing the above issue on ARM64, even after restarting the failed jobs, the issue hasn’t been resolved.

Also, I am facing the issue in many different packages, apart from matplotlib the issue could be seen in python-lz4 and scipy build jobs. Please have a look:

[https://travis-ci.com/github/odidev/python-lz4/jobs/311136891](https://travis-ci.com/github/odidev/python-lz4/jobs/311136891)  
[https://travis-ci.com/github/ossdev07/scipy/jobs/301521163](https://travis-ci.com/github/ossdev07/scipy/jobs/301521163)

```auto
ERROR: Could not build wheels for scipy which use PEP 517 and cannot be installed directly

```

This looks like an ARM64 specific issue since not getting it on AMD64 platform, Please suggest what could be done to resolve the same.

---

<div class="post-metadata">

**Author:** ![noloader](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/noloader/32/2971_2.png) [@noloader](https://travis-ci.community/u/noloader)\
**Post date:** [April 1, 2020, 1:18pm UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/4 "2020-04-01T13:18:18Z")

</div>

@odidev,

> I am facing the issue in many different packages, apart from matplotlib the issue could be seen in python-lz4 and scipy build jobs.

Sorry, I don’t work in Python. I am not experienced with fixing the associated problems.

---

<div class="post-metadata">

**Author:** ![odidev](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/odidev/32/4162_2.png) [@odidev](https://travis-ci.community/u/odidev)\
**Post date:** [April 3, 2020, 12:47pm UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/5 "2020-04-03T12:47:44Z")

</div>

@Michal Please could you have a look at the issue.

---

<div class="post-metadata">

**Author:** ![alex](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/alex/32/4308_2.png) [@alex](https://travis-ci.community/u/alex)\
**Post date:** [April 12, 2020, 10:04pm UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/6 "2020-04-12T22:04:02Z")

</div>

Confirmed that we’re still seeing this issue. PR here: [https://github.com/pyca/cryptography/pull/5192](https://github.com/pyca/cryptography/pull/5192)

Failing builds:

- ppc64le: [https://travis-ci.org/github/pyca/cryptography/jobs/674186262](https://travis-ci.org/github/pyca/cryptography/jobs/674186262)
- s390x: [https://travis-ci.org/github/pyca/cryptography/jobs/674186263](https://travis-ci.org/github/pyca/cryptography/jobs/674186263)
- arm64: [https://travis-ci.org/github/pyca/cryptography/jobs/674186261](https://travis-ci.org/github/pyca/cryptography/jobs/674186261)

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [April 13, 2020, 2:35pm UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/7 "2020-04-13T14:35:55Z")

</div>

[Checking the build environment](https://travis-ci.org/github/native-api/test_travis/jobs/674435368) shows that [in ARM64 Python image, `/home/travis/.cache/pip/wheels` is erroneously owned by `root`](https://travis-ci.org/github/native-api/test_travis/jobs/674435368#L12148).

So a workaround would be:

```auto
sudo chown -Rv $USER:$(id -g) ~/.cache/pip/wheels

```

---

<div class="post-metadata">

**Author:** ![fingolfin](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fingolfin/32/2110_2.png) [@fingolfin](https://travis-ci.community/u/fingolfin)\
**Post date:** [April 14, 2020, 12:21am UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/8 "2020-04-14T00:21:28Z")

</div>

I’ve just run into the same issue

@native-api thanks for the suggested workaround, will try it

UPDATE: it worked, thanks! Of course that just resulted in me running into the next issue with arm64/ppc64le/s390x support… _sigh_

---

<div class="post-metadata">

**Author:** ![fingolfin](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fingolfin/32/2110_2.png) [@fingolfin](https://travis-ci.community/u/fingolfin)\
**Post date:** [April 14, 2020, 12:26am UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/9 "2020-04-14T00:26:03Z")

</div>

See also [No cache support on arm64?](https://travis-ci.community/t/5416/28) where the issue is also discussed; @BanzaiMan wanted to look into it February 20, 2020, but then nothing seems to have happened?

---

<div class="post-metadata">

**Author:** ![odidev](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/odidev/32/4162_2.png) [@odidev](https://travis-ci.community/u/odidev)\
**Post date:** [April 21, 2020, 3:56am UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/10 "2020-04-21T03:56:42Z")

</div>

Thanks @alex @native-api for the suggestions. We are using workarounds suggested.

Does anyone have idea that when can it be resolved permanently for arm64?

Thanks.

---

<div class="post-metadata">

**Author:** ![fingolfin](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fingolfin/32/2110_2.png) [@fingolfin](https://travis-ci.community/u/fingolfin)\
**Post date:** [April 24, 2020, 12:40am UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/11 "2020-04-24T00:40:13Z")

</div>

> [@odidev](#):
>
> Does anyone have idea that when can it be resolved permanently for arm64?

Sadly, Travis staff has been completely silent since late Februrary on issues with the arm, ppc and s390x environments, of which there are plenty ☹

---

<div class="post-metadata">

**Author:** ![sohmc](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/sohmc/32/4505_2.png) [@sohmc](https://travis-ci.community/u/sohmc)\
**Post date:** [May 3, 2020, 1:57am UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/12 "2020-05-03T01:57:24Z")

</div>

[I’m actually having this same issue with a pyInstaller buidl](https://travis-ci.com/github/sohmc/cloudflare-ddns-py/jobs/326829429).

[It was working completely fine 4 months ago](https://travis-ci.com/github/sohmc/cloudflare-ddns-py/jobs/271065592). I tried the sudo method but doesn’t seem to work as the apt-get install is causing the error.

---

<div class="post-metadata">

**Author:** ![fingolfin](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/fingolfin/32/2110_2.png) [@fingolfin](https://travis-ci.community/u/fingolfin)\
**Post date:** [May 16, 2020, 10:19pm UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/13 "2020-05-16T22:19:43Z")

</div>

> [@sohmc](#):
>
> I tried the sudo method but doesn’t seem to work as the apt-get install is causing the error.

You can put it into `before_install` then it is run before `apt-get`; see e.g. here: [https://github.com/gap-system/gap/blob/5d2fe4aad4721b03a24dd47af239b27765c49f19/.travis.yml#L163](https://github.com/gap-system/gap/blob/5d2fe4aad4721b03a24dd47af239b27765c49f19/.travis.yml#L163)

---

<div class="post-metadata">

**Author:** ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)\
**Post date:** [October 21, 2020, 3:35pm UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/14 "2020-10-21T15:35:38Z")

</div>

Now, in ARM image, `~/.cache/pip/wheels` is missing altogether: [https://travis-ci.com/github/native-api/test\_travis/jobs/403231257#L12192-L12195](https://travis-ci.com/github/native-api/test_travis/jobs/403231257#L12192-L12195)

So this issue should be fixed.

---

<div class="post-metadata">

**Author:** ![Siddhesh-Ghadi](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/siddhesh-ghadi/32/7962_2.png) [@Siddhesh-Ghadi](https://travis-ci.community/u/Siddhesh-Ghadi)\
**Post date:** [November 10, 2020, 6:03am UTC](https://travis-ci.community/t/permission-issue-while-building-wheels-for-various-python-packages/7822/15 "2020-11-10T06:03:28Z")

</div>

This issue has also been fixed on ppc64le
