У меня 2 установки Python на моем Mac OSX.
$ which python
/usr/bin/python
$ which python3
/Library/Frameworks/Python.framework/Versions/3.4/bin/python3
$ pip install --upgrade setuptools
Collecting setuptools
Downloading https://files.pythonhosted.org/packages/37/06/754589caf971b0d2d48f151c2586f62902d93dc908e2fd9b9b9f6aa3c9dd/setuptools-40.6.3-py2.py3-none-any.whl (573kB)
100% |████████████████████████████████| 655kB 1.5MB/s
Installing collected packages: setuptools
Found existing installation: setuptools 2.1
Uninstalling setuptools-2.1:
Successfully uninstalled setuptools-2.1
Successfully installed setuptools-40.6.3
$ which pip
/Library/Frameworks/Python.framework/Versions/3.4/bin/pip
$ pip -V
pip 18.1 from /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pip (python 3.4)
Я могу установить модули в тонкой форме.например, $ python3 -m pip install --user tenorflow Успешно установлен absl-py-0.6.1 astor-0.7.1 gast-0.2.0 grpcio-1.17.1 markdown-3.0.1 protobuf-3.6.1 tenorboard-1.12.1 tenorflow-1.12.0 termcolor-1.1.0 werkzeug-0.14.1
, но когда я пытаюсь сделать то же самое с pandas $ python3 -m pip install --user pandas
, он проходит доконец сбором и загрузкой зависимостей, но выдает ошибки со следующей ошибкой.
Collecting pandas
Downloading https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz (11.3MB)
100% |████████████████████████████████| 11.4MB 1.5MB/s
Installing build dependencies ... done
Complete output from command python setup.py egg_info:
Download error on https://pypi.org/simple/numpy/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:600) -- Some packages may not be found!
Couldn't find index page for 'numpy' (maybe misspelled?)
Download error on https://pypi.org/simple/: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:600) -- Some packages may not be found!
No local packages or working download links found for numpy>=1.9.0
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/d5/k1w6m6xj5g727x952sdkkc1r0000gn/T/pip-install-r4n38agj/pandas/setup.py", line 743, in <module>
**setuptools_kwargs)
File "/private/var/folders/d5/k1w6m6xj5g727x952sdkkc1r0000gn/T/pip-build-env-fqe1gkak/lib/python3.4/site-packages/setuptools/__init__.py", line 142, in setup
_install_setup_requires(attrs)
File "/private/var/folders/d5/k1w6m6xj5g727x952sdkkc1r0000gn/T/pip-build-env-fqe1gkak/lib/python3.4/site-packages/setuptools/__init__.py", line 137, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/private/var/folders/d5/k1w6m6xj5g727x952sdkkc1r0000gn/T/pip-build-env-fqe1gkak/lib/python3.4/site-packages/setuptools/dist.py", line 586, in fetch_build_eggs
replace_conflicting=True,
File "/private/var/folders/d5/k1w6m6xj5g727x952sdkkc1r0000gn/T/pip-build-env-fqe1gkak/lib/python3.4/site-packages/pkg_resources/__init__.py", line 780, in resolve
replace_conflicting=replace_conflicting
File "/private/var/folders/d5/k1w6m6xj5g727x952sdkkc1r0000gn/T/pip-build-env-fqe1gkak/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1063, in best_match
return self.obtain(req, installer)
File "/private/var/folders/d5/k1w6m6xj5g727x952sdkkc1r0000gn/T/pip-build-env-fqe1gkak/lib/python3.4/site-packages/pkg_resources/__init__.py", line 1075, in obtain
return installer(requirement)
File "/private/var/folders/d5/k1w6m6xj5g727x952sdkkc1r0000gn/T/pip-build-env-fqe1gkak/lib/python3.4/site-packages/setuptools/dist.py", line 653, in fetch_build_egg
return cmd.easy_install(req)
File "/private/var/folders/d5/k1w6m6xj5g727x952sdkkc1r0000gn/T/pip-build-env-fqe1gkak/lib/python3.4/site-packages/setuptools/command/easy_install.py", line 673, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('numpy>=1.9.0')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/d5/k1w6m6xj5g727x952sdkkc1r0000gn/T/pip-install-r4n38agj/pandas/
Кажется, проблема в том, что он использует Python, где он должен использовать python3 в python setup.py egg_info
как мне убедиться, что pip использует python3 в сценариях илиесть ли другие проблемы?