databrickslabs / migrate

Old scripts for one-off ST-to-E2 migrations. Use "terraform exporter" linked in the readme.
Other
186 stars 128 forks source link

python3 setup.py install fails #199

Closed i10416 closed 1 year ago

i10416 commented 2 years ago

Both python3 setup.py install and sudo python3 setup.py install fail on M1 Mac. Not tested on Intel Mac.

    System Software Overview:

      System Version: macOS 12.5 (21G72)
      Kernel Version: Darwin 21.6.0
      Boot Volume: Macintosh HD
      Boot Mode: Normal
      Computer Name:  ********
      User Name: ********
      Secure Virtual Memory: Enabled
      System Integrity Protection: Enabled
  warnings.warn(
error: Setup script exited with error: SandboxViolation: mkdir('/private/var/root/Library/Caches/com.apple.python/private', 511) {}

with --user

  warnings.warn(
error: Setup script exited with error: SandboxViolation: mkdir('/Users/username/Library/Caches/com.apple.python/private', 511) {}

workaround

run python3 setup.py install in linux docker container like ubuntu:latest

log

python3 setup.py install --user
running install
/Users/username/Library/Python/3.8/lib/python/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/Users/username/Library/Python/3.8/lib/python/site-packages/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
running bdist_egg
running egg_info
writing databricks_migration_tool.egg-info/PKG-INFO
writing dependency_links to databricks_migration_tool.egg-info/dependency_links.txt
writing requirements to databricks_migration_tool.egg-info/requires.txt
writing top-level names to databricks_migration_tool.egg-info/top_level.txt
reading manifest file 'databricks_migration_tool.egg-info/SOURCES.txt'
adding license file 'LICENSE'
adding license file 'NOTICE'
writing manifest file 'databricks_migration_tool.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.14-arm64/egg
running install_lib
running build_py
creating build/bdist.macosx-10.14-arm64/egg
creating build/bdist.macosx-10.14-arm64/egg/pipeline
copying build/lib/pipeline/task.py -> build/bdist.macosx-10.14-arm64/egg/pipeline
copying build/lib/pipeline/pipeline_test.py -> build/bdist.macosx-10.14-arm64/egg/pipeline
copying build/lib/pipeline/__init__.py -> build/bdist.macosx-10.14-arm64/egg/pipeline
copying build/lib/pipeline/pipeline.py -> build/bdist.macosx-10.14-arm64/egg/pipeline
creating build/bdist.macosx-10.14-arm64/egg/validate
copying build/lib/validate/json_diff_test.py -> build/bdist.macosx-10.14-arm64/egg/validate
copying build/lib/validate/__init__.py -> build/bdist.macosx-10.14-arm64/egg/validate
copying build/lib/validate/json_diff.py -> build/bdist.macosx-10.14-arm64/egg/validate
creating build/bdist.macosx-10.14-arm64/egg/tasks
copying build/lib/tasks/tasks.py -> build/bdist.macosx-10.14-arm64/egg/tasks
copying build/lib/tasks/__init__.py -> build/bdist.macosx-10.14-arm64/egg/tasks
copying build/lib/tasks/tasks_test.py -> build/bdist.macosx-10.14-arm64/egg/tasks
creating build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/SecretsClient.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/ScimClient.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/ClustersClient.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/__init__.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/HiveClient.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/dbclient.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/parser.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/JobsClient.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/LibraryClient.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/TableACLsClient.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/MLFlowClient.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/WorkspaceClient.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
copying build/lib/dbclient/DbfsClient.py -> build/bdist.macosx-10.14-arm64/egg/dbclient
creating build/bdist.macosx-10.14-arm64/egg/test
copying build/lib/test/checkpoint_service_test.py -> build/bdist.macosx-10.14-arm64/egg/test
copying build/lib/test/__init__.py -> build/bdist.macosx-10.14-arm64/egg/test
copying build/lib/test/thread_safe_writer_test.py -> build/bdist.macosx-10.14-arm64/egg/test
copying build/lib/test/threading_utils_test.py -> build/bdist.macosx-10.14-arm64/egg/test
copying build/lib/test_connection.py -> build/bdist.macosx-10.14-arm64/egg
copying build/lib/export_db.py -> build/bdist.macosx-10.14-arm64/egg
copying build/lib/migration_pipeline.py -> build/bdist.macosx-10.14-arm64/egg
copying build/lib/import_db.py -> build/bdist.macosx-10.14-arm64/egg
creating build/bdist.macosx-10.14-arm64/egg/EGG-INFO
copying databricks_migration_tool.egg-info/PKG-INFO -> build/bdist.macosx-10.14-arm64/egg/EGG-INFO
copying databricks_migration_tool.egg-info/SOURCES.txt -> build/bdist.macosx-10.14-arm64/egg/EGG-INFO
copying databricks_migration_tool.egg-info/dependency_links.txt -> build/bdist.macosx-10.14-arm64/egg/EGG-INFO
copying databricks_migration_tool.egg-info/requires.txt -> build/bdist.macosx-10.14-arm64/egg/EGG-INFO
copying databricks_migration_tool.egg-info/top_level.txt -> build/bdist.macosx-10.14-arm64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/databricks_migration_tool-1.0.1-py3.8.egg' and adding 'build/bdist.macosx-10.14-arm64/egg' to it
removing 'build/bdist.macosx-10.14-arm64/egg' (and everything under it)
Processing databricks_migration_tool-1.0.1-py3.8.egg
Removing /Users/username/Library/Python/3.8/lib/python3.8/site-packages/databricks_migration_tool-1.0.1-py3.8.egg
Copying databricks_migration_tool-1.0.1-py3.8.egg to /Users/username/Library/Python/3.8/lib/python3.8/site-packages
Adding databricks-migration-tool 1.0.1 to easy-install.pth file

Installed /Users/username/Library/Python/3.8/lib/python3.8/site-packages/databricks_migration_tool-1.0.1-py3.8.egg
Processing dependencies for databricks-migration-tool==1.0.1
Searching for cron-descriptor
Reading https://pypi.org/simple/cron-descriptor/
/Users/username/Library/Python/3.8/lib/python/site-packages/pkg_resources/__init__.py:123: PkgResourcesDeprecationWarning:  is an invalid version and will not be supported in a future release
  warnings.warn(
Downloading https://files.pythonhosted.org/packages/11/61/7365fae87f509e88803931e08f6210ee4d6cfe02dbc0ff84b39bdf54cc3e/cron_descriptor-1.2.31.tar.gz#sha256=8e83f08dbd76657a0b6ce1168b293bc27fa68be573ef8cb086ef0d9896340876
Best match: cron-descriptor 1.2.31
Processing cron_descriptor-1.2.31.tar.gz
Writing /var/folders/25/j44kzkh50lncdcbqnp57jfbc0000gn/T/easy_install-erps81pv/cron_descriptor-1.2.31/setup.cfg
Running cron_descriptor-1.2.31/setup.py -q bdist_egg --dist-dir /var/folders/25/j44kzkh50lncdcbqnp57jfbc0000gn/T/easy_install-erps81pv/cron_descriptor-1.2.31/egg-dist-tmp-judwsrwh
warning: no files found matching '*' under directory 'locale'
/Users/username/Library/Python/3.8/lib/python/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
error: Setup script exited with error: SandboxViolation: mkdir('/Users/username/Library/Caches/com.apple.python/private', 511) {}

The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.

This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand.  Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
gregwood-db commented 1 year ago

Closing this for now, as it seems to be due to environment issues- please open a new issue if necessary.