Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not install pythemis from source on macOS with CPU M1 #968

Closed
1 of 2 tasks
radetsky opened this issue Nov 9, 2022 · 5 comments
Closed
1 of 2 tasks

Can not install pythemis from source on macOS with CPU M1 #968

radetsky opened this issue Nov 9, 2022 · 5 comments
Labels
M1 W-PyThemis 🐍 Wrapper: PyThemis, Python API

Comments

@radetsky
Copy link
Contributor

radetsky commented Nov 9, 2022

Describe the bug
I wish to install pythemis from the source code. I can not do it.

To Reproduce
Steps to reproduce the behavior:

  1. Use macOS 12.6, CPU Apple M1 Pro.
  2. Clone the repository. Run make pythemis_install
  3. See the following error:
pythemis install                                                   [ERRORS]
cd src/wrappers/themis/python/ && python3 setup.py install --record files3.txt
running install
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: '/Library/Python'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /Library/Python/3.9/site-packages/

This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
make: *** [pythemis_install] Error 1

Expected behavior
Installed pythemis to my environment.

Environment (please complete the following information):

  • OS: macOS 12.6
  • Hardware: Apple M1 Pro, MacBook Pro 14" 2021
  • Themis version: 0.14.10
  • Installation way:
    • via package manager
    • built from source
@vixentael vixentael added W-PyThemis 🐍 Wrapper: PyThemis, Python API M1 labels Nov 9, 2022
@vixentael
Copy link
Contributor

@ilammy if you have M1 can you please take a look? We struggle with paths...

@ilammy
Copy link
Collaborator

ilammy commented Nov 20, 2022

I’m sorry, don’t have M1 – my current computer is not dead yet 😅

That said, I tend to think this isn’t something related to M1, but rather the usual Python problem.

What does which python3 say? Lots of people install their Python from Homebrew, but Homebrew Python should not be installing its stuff into system’s /Library but rather /opt/homebrew/lib/python3.9/site-packages (on M1). You can use the following snippet to find out the search paths:

python3 -c "import sys; print('\n'.join(sys.path))"

That should be setup.py’s job to figure out the path it wants the packages to be in.

@radetsky
Copy link
Contributor Author

There is no word about /Library/Python. Google says 'use sudo, Luke', but I do not want to use it. It is not the usual way.

rad@Oleksiis-M1-2021 ~/g/p/t/themis (release/0.14) [2]> python3 -c "import sys; print('\n'.join(sys.path))"

/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python39.zip
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/lib-dynload
/Users/rad/Library/Python/3.9/lib/python/site-packages
/Users/rad/Library/Python/3.9/lib/python/site-packages/pythemis-0.14.10-py3.9.egg
/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/site-packages

but

python3 setup.py install --user resolves the issue.

@Lagovas
Copy link
Collaborator

Lagovas commented Nov 28, 2022

actually all installations via our makefile designed to install into the system-wide folders. there is no target to install into the local home folders.

@radetsky
Copy link
Contributor Author

radetsky commented Dec 9, 2022

After the release of themis-0.14.10 I tried the newly released package from PyPI and it gave me the warning "System-wide directory not available to write, installing in user directory"
So, It is not the themis problem. It is a problem of the whole python. I am closing the issue.

@radetsky radetsky closed this as completed Dec 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
M1 W-PyThemis 🐍 Wrapper: PyThemis, Python API
Projects
None yet
Development

No branches or pull requests

4 participants