PermissionError encoding/lib/cpu/lock
See original GitHub issue- Installing system-wide Pytorch-Encoding I got the next error.
- Commands
sudo -H pip3 install --upgrade --no-cache-dir torch-encoding
python3
>>> import torch
>>> import encoding
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.5/site-packages/encoding/__init__.py", line 13, in <module>
from . import nn, functions, dilated, parallel, utils, models, datasets
File "/usr/local/lib/python3.5/site-packages/encoding/nn/__init__.py", line 12, in <module>
from .encoding import *
File "/usr/local/lib/python3.5/site-packages/encoding/nn/encoding.py", line 18, in <module>
from ..functions import scaledL2, aggregate
File "/usr/local/lib/python3.5/site-packages/encoding/functions/__init__.py", line 2, in <module>
from .encoding import *
File "/usr/local/lib/python3.5/site-packages/encoding/functions/encoding.py", line 13, in <module>
from .. import lib
File "/usr/local/lib/python3.5/site-packages/encoding/lib/__init__.py", line 12, in <module>
], build_directory=cpu_path, verbose=False)
File "/usr/local/lib/python3.5/site-packages/torch/utils/cpp_extension.py", line 476, in load
if baton.try_acquire():
File "/usr/local/lib/python3.5/site-packages/torch/utils/file_baton.py", line 29, in try_acquire
self.fd = os.open(self.lock_file_path, os.O_CREAT | os.O_EXCL)
PermissionError: [Errno 13] Permission denied: '/usr/local/lib/python3.5/site-packages/encoding/lib/cpu/lock'
If you need more information please let me know it.
Thanks
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
with open(result.csv , a, newline=, encoding='utf-8') as f
Permission denied means you are not allowed to access a file. But why this happens? This is because a file has 3 access...
Read more >os — Miscellaneous operating system interfaces
The file system encoding must guarantee to successfully decode all bytes below 128. If the file system encoding fails to provide this guarantee,...
Read more >Bug listing with status RESOLVED with resolution OBSOLETE ...
o.lock to be removed" displayed by libtool in infinite loop (e.g. ... "thread.c permission error when starting vdr"" status:RESOLVED resolution:OBSOLETE ...
Read more >Python - IOError: [Errno 13] Permission denied
Check if you are implementing the code inside a could drive like box, dropbox etc. If you copy the files you are trying...
Read more >Bug #1953720 “OSError: [Errno 30] Read-only file system: '/var/c...”
1) due to an encoding error, pyzor is throwing an exception. 2) /usr/lib/python3/dist-packages/apport_python_hook.py is the exception handler invoked ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I see the problem. It is because you were using ‘sudo pip install’ and the files are post compiled after installation.
hacky.py
withimport encoding
, and run好的,谢谢您的回复