Permissions error during pip install on MacOS/Homebrew Python3

Đang mở
#38 3 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
build-system

Hướng nghiên cứu

Bắt đầu bằng cách kiểm tra setup.py và MANIFEST.in, sau đó tái hiện quá trình cài đặt pip3 của Homebrew Python 3 trên macOS. Hoàn tất khi quá trình cài đặt gói không còn cố gắng sao chép README.rst, CHANGELOG.rst hoặc LICENSE vào /usr/local và hoàn thành mà không gặp lỗi quyền truy cập.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

pending release

Hi,

I ran into a permissions error during pip3 install as your setup.py seems to want to copy data files to /usr/local on my machine, i.e.

$ pip3 install base64io
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting base64io
  Using cached base64io-1.0.3-py2.py3-none-any.whl (17 kB)
Installing collected packages: base64io
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: '/usr/local/CHANGELOG.rst'
Consider using the `--user` option or check the permissions.

As it happens, the installation does still succeed, despite the error message indicating otherwise.

I realise I can simply perform a --user install and work around this issue, but I don't think that should be necessary. I'm using Homebrew installed Python 3.9.5 on MacOS, both pip3 and python3 are in /usr/local/bin.

I think this can be solved by replacing

data_files=["README.rst", "CHANGELOG.rst", "LICENSE"],

with

include_package_data=True,

in setup.py as the files are already listed for inclusion in MANIFEST.in.

Ngôn ngữ chính
Python
Star
42
Fork
30
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của aws/base64io-python

Tất cả issue của aws/base64io-python

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.