Ошибка pip install python-binance (команда "/ usr / bin / python -u -c" импортирует setuptools ...) - PullRequest
0 голосов
/ 03 июня 2018

Я пытаюсь pip установить python-binance , но не могу этого сделать: / .. Я искал похожие ошибки, прежде чем спрашивать, и нашел некоторые, но когда я делаю то, что говорят люди (например, * 1003)* pip install setuptools --upgrade возвращает ошибку), он все еще не работает.Может кто-нибудь помочь мне, пожалуйста?Вот что положил терминал:

   AirdeGuillaume:~ guigui$ pip install python-binance
Collecting python-binance
  Using cached https://files.pythonhosted.org/packages/da/fe/c923be9df86a7d540f31e1292990a14f77652371f1800741129e9fa3e9e4/python_binance-0.6.9-py2.py3-none-any.whl
Collecting cryptography (from python-binance)
  Using cached https://files.pythonhosted.org/packages/58/c1/23bea66007d4be75ce02056fac665f9a207535e89fb3c7931420fa4a5f57/cryptography-2.2.2-cp27-cp27m-macosx_10_6_intel.whl
Requirement already satisfied: six in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from python-binance) (1.4.1)
Requirement already satisfied: urllib3 in /Library/Python/2.7/site-packages (from python-binance) (1.22)
Collecting autobahn (from python-binance)
  Using cached https://files.pythonhosted.org/packages/71/0c/af6e79f0cc23668454f4a73ec10b96bdb5b7f172509179da4fc92bce4142/autobahn-18.5.2-py2.py3-none-any.whl
Collecting Twisted (from python-binance)
  Using cached https://files.pythonhosted.org/packages/12/2a/e9e4fb2e6b2f7a75577e0614926819a472934b0b85f205ba5d5d2add54d0/Twisted-18.4.0.tar.bz2
Requirement already satisfied: chardet in /Library/Python/2.7/site-packages (from python-binance) (3.0.4)
Requirement already satisfied: pyOpenSSL in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from python-binance) (0.13.1)
Collecting dateparser (from python-binance)
  Using cached https://files.pythonhosted.org/packages/ac/9e/1aa87c0c59f9731820bfd20a8b148d97b315530c2c92d1fb300328c8c42f/dateparser-0.7.0-py2.py3-none-any.whl
Requirement already satisfied: requests in /Library/Python/2.7/site-packages (from python-binance) (2.18.4)
Collecting service-identity (from python-binance)
  Using cached https://files.pythonhosted.org/packages/29/fa/995e364220979e577e7ca232440961db0bf996b6edaf586a7d1bd14d81f1/service_identity-17.0.0-py2.py3-none-any.whl
Requirement already satisfied: certifi in /Library/Python/2.7/site-packages (from python-binance) (2018.4.16)
Collecting cffi>=1.7; platform_python_implementation != "PyPy" (from cryptography->python-binance)
  Using cached https://files.pythonhosted.org/packages/7e/4a/b647e46faaa2dcfb16069b6aad2d8509982fd63710a325b8ad7db80f18be/cffi-1.11.5-cp27-cp27m-macosx_10_6_intel.whl
Collecting enum34; python_version < "3" (from cryptography->python-binance)
  Using cached https://files.pythonhosted.org/packages/c5/db/e56e6b4bbac7c4a06de1c50de6fe1ef3810018ae11732a50f15f62c7d050/enum34-1.1.6-py2-none-any.whl
Requirement already satisfied: idna>=2.1 in /Library/Python/2.7/site-packages (from cryptography->python-binance) (2.6)
Collecting asn1crypto>=0.21.0 (from cryptography->python-binance)
  Using cached https://files.pythonhosted.org/packages/ea/cd/35485615f45f30a510576f1a56d1e0a7ad7bd8ab5ed7cdc600ef7cd06222/asn1crypto-0.24.0-py2.py3-none-any.whl
Collecting ipaddress; python_version < "3" (from cryptography->python-binance)
  Using cached https://files.pythonhosted.org/packages/fc/d0/7fc3a811e011d4b388be48a0e381db8d990042df54aa4ef4599a31d39853/ipaddress-1.0.22-py2.py3-none-any.whl
Collecting txaio>=2.10.0 (from autobahn->python-binance)
  Using cached https://files.pythonhosted.org/packages/dc/2e/c8a877b0a5c2798fa93ebcc1465a72a68c089e5f8b0a852ca335751dcc5a/txaio-2.10.0-py2.py3-none-any.whl
Collecting zope.interface>=4.4.2 (from Twisted->python-binance)
  Using cached https://files.pythonhosted.org/packages/ac/8a/657532df378c2cd2a1fe6b12be3b4097521570769d4852ec02c24bd3594e/zope.interface-4.5.0.tar.gz
Collecting constantly>=15.1 (from Twisted->python-binance)
  Using cached https://files.pythonhosted.org/packages/b9/65/48c1909d0c0aeae6c10213340ce682db01b48ea900a7d9fce7a7910ff318/constantly-15.1.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from Twisted->python-binance)
  Using cached https://files.pythonhosted.org/packages/f5/1d/c98a587dc06e107115cf4a58b49de20b19222c83d75335a192052af4c4b7/incremental-17.5.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from Twisted->python-binance)
  Using cached https://files.pythonhosted.org/packages/17/6a/1baf488c2015ecafda48c03ca984cf0c48c254622668eb1732dbe2eae118/Automat-0.6.0-py2.py3-none-any.whl
Collecting hyperlink>=17.1.1 (from Twisted->python-binance)
  Using cached https://files.pythonhosted.org/packages/a7/b6/84d0c863ff81e8e7de87cff3bd8fd8f1054c227ce09af1b679a8b17a9274/hyperlink-18.0.0-py2.py3-none-any.whl
Requirement already satisfied: python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from dateparser->python-binance) (1.5)
Requirement already satisfied: pytz in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from dateparser->python-binance) (2013.7)
Collecting tzlocal (from dateparser->python-binance)
  Using cached https://files.pythonhosted.org/packages/cb/89/e3687d3ed99bc882793f82634e9824e62499fdfdc4b1ae39e211c5b05017/tzlocal-1.5.1.tar.gz
Collecting regex (from dateparser->python-binance)
  Using cached https://files.pythonhosted.org/packages/a2/51/c39562cfed3272592c60cfd229e5464d715b78537e332eac2b695422dc49/regex-2018.02.21.tar.gz
Collecting attrs (from service-identity->python-binance)
  Using cached https://files.pythonhosted.org/packages/41/59/cedf87e91ed541be7957c501a92102f9cc6363c623a7666d69d51c78ac5b/attrs-18.1.0-py2.py3-none-any.whl
Collecting pyasn1 (from service-identity->python-binance)
  Using cached https://files.pythonhosted.org/packages/a0/70/2c27740f08e477499ce19eefe05dbcae6f19fdc49e9e82ce4768be0643b9/pyasn1-0.4.3-py2.py3-none-any.whl
Collecting pyasn1-modules (from service-identity->python-binance)
  Using cached https://files.pythonhosted.org/packages/e9/51/bcd96bf6231d4b2cc5e023c511bee86637ba375c44a6f9d1b4b7ad1ce4b9/pyasn1_modules-0.2.1-py2.py3-none-any.whl
Collecting pycparser (from cffi>=1.7; platform_python_implementation != "PyPy"->cryptography->python-binance)
  Using cached https://files.pythonhosted.org/packages/8c/2d/aad7f16146f4197a11f8e91fb81df177adcc2073d36a17b1491fd09df6ed/pycparser-2.18.tar.gz
Requirement already satisfied: setuptools in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from zope.interface>=4.4.2->Twisted->python-binance) (18.5)
autobahn 18.5.2 has requirement six>=1.10.0, but you'll have six 1.4.1 which is incompatible.
Installing collected packages: pycparser, cffi, enum34, asn1crypto, ipaddress, cryptography, txaio, autobahn, zope.interface, constantly, incremental, attrs, Automat, hyperlink, Twisted, tzlocal, regex, dateparser, pyasn1, pyasn1-modules, service-identity, python-binance
  Running setup.py install for pycparser ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6v/nhcqqhqj0ys3hwhj6gwg6nlh0000gn/T/pip-install-bgPqCy/pycparser/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/6v/nhcqqhqj0ys3hwhj6gwg6nlh0000gn/T/pip-record-M0dU4u/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/pycparser
    copying pycparser/c_parser.py -> build/lib/pycparser
    copying pycparser/_ast_gen.py -> build/lib/pycparser
    copying pycparser/__init__.py -> build/lib/pycparser
    copying pycparser/c_ast.py -> build/lib/pycparser
    copying pycparser/plyparser.py -> build/lib/pycparser
    copying pycparser/_build_tables.py -> build/lib/pycparser
    copying pycparser/ast_transforms.py -> build/lib/pycparser
    copying pycparser/yacctab.py -> build/lib/pycparser
    copying pycparser/c_generator.py -> build/lib/pycparser
    copying pycparser/c_lexer.py -> build/lib/pycparser
    copying pycparser/lextab.py -> build/lib/pycparser
    creating build/lib/pycparser/ply
    copying pycparser/ply/yacc.py -> build/lib/pycparser/ply
    copying pycparser/ply/lex.py -> build/lib/pycparser/ply
    copying pycparser/ply/ctokens.py -> build/lib/pycparser/ply
    copying pycparser/ply/__init__.py -> build/lib/pycparser/ply
    copying pycparser/ply/cpp.py -> build/lib/pycparser/ply
    copying pycparser/ply/ygen.py -> build/lib/pycparser/ply
    copying pycparser/_c_ast.cfg -> build/lib/pycparser
    running install_lib
    creating /Library/Python/2.7/site-packages/pycparser
    error: could not create '/Library/Python/2.7/site-packages/pycparser': Permission denied

    ----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/6v/nhcqqhqj0ys3hwhj6gwg6nlh0000gn/T/pip-install-bgPqCy/pycparser/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/6v/nhcqqhqj0ys3hwhj6gwg6nlh0000gn/T/pip-record-M0dU4u/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/6v/nhcqqhqj0ys3hwhj6gwg6nlh0000gn/T/pip-install-bgPqCy/pycparser/

1 Ответ

0 голосов
/ 03 июня 2018

Ключевая строка в вашей трассировке:

    error: could not create '/Library/Python/2.7/site-packages/pycparser': Permission denied

Попробуйте запустить с флагом --user pip install --user python-binace или sudo pip install python-binace.

Редактировать: Просто увидел, что @hoefling опередил меня в комментариях.Кредит, причитающийся.

...