0

我正在尝试安装ibm_db_sa在我的 miniconda 虚拟环境(python 3.6)中。我看到此错误,可能是因为我是笔记本电脑上的单独用户,而不是管理员。有什么解决方案/解决方法吗?

sudo pip install ibm_db_sa
Password:
WARNING: The directory '/Users/myname/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting ibm_db_sa
  Downloading ibm_db_sa-0.3.7.tar.gz (30 kB)
Requirement already satisfied: sqlalchemy>=0.7.3 in /usr/local/Caskroom/miniconda/base/envs/finalenv/lib/python3.6/site-packages (from ibm_db_sa) (1.4.25)
Collecting ibm_db>=2.0.0
  Downloading ibm_db-3.0.4.tar.gz (796 kB)
     |████████████████████████████████| 796 kB 1.1 MB/s 
    ERROR: Command errored out with exit status 1:
     command: /usr/local/Caskroom/miniconda/base/envs/finalenv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/tmp/pip-install-2fdrlxey/ibm-db_375dbdf21455451c871e608261014786/setup.py'"'"'; __file__='"'"'/private/tmp/pip-install-2fdrlxey/ibm-db_375dbdf21455451c871e608261014786/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/tmp/pip-pip-egg-info-jzevidp0
         cwd: /private/tmp/pip-install-2fdrlxey/ibm-db_375dbdf21455451c871e608261014786/
    Complete output (3 lines):
    Detected 64-bit Python
    Downloading https://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz
    error in ibm_db setup command: use_2to3 is invalid.
WARNING: Discarding https://files.pythonhosted.org/packages/b6/0c/a8d57078772abcc876f6a2be2252f12284aa6f71f41d3c2910f23369d7d2/ibm_db-2.0.6.1.tar.gz#sha256=bdc6543702e19d8ff7a0ddef715a9ee32a7753686cbcfe99095c2e357efe4135 (from https://pypi.org/simple/ibm-db/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Downloading ibm_db-2.0.5.1.tar.gz (460 kB)
     |████████████████████████████████| 460 kB 1.1 MB/s 
ERROR: No .egg-info directory found in /private/tmp/pip-pip-egg-info-y8tp952r
4

1 回答 1

-1

您遇到的问题似乎与 setuptools 的问题有关。在 ibm_db 驱动程序的GitHub 存储库中查看此问题

于 2021-09-29T08:47:54.100 回答