У меня есть следующий requirements.txt
файл:
appdirs==1.4.3
decorator==4.3.0
numpy==1.15.4
pybind11==2.2.4
pyopencl==2018.2.2
pytools==2018.5.2
six==1.12.0
Запуск pip install -r requirements.txt
завершается неудачно с:
Collecting appdirs==1.4.3 (from -r reqs.txt (line 1))
Downloading https://files.pythonhosted.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl
Collecting decorator==4.3.0 (from -r reqs.txt (line 2))
Downloading https://files.pythonhosted.org/packages/bc/bb/a24838832ba35baf52f32ab1a49b906b5f82fb7c76b2f6a7e35e140bac30/decorator-4.3.0-py2.py3-none-any.whl
Collecting numpy==1.15.4 (from -r reqs.txt (line 3))
Downloading https://files.pythonhosted.org/packages/86/04/bd774106ae0ae1ada68c67efe89f1a16b2aa373cc2db15d974002a9f136d/numpy-1.15.4-cp35-cp35m-manylinux1_x86_64.whl (13.8MB)
100% |████████████████████████████████| 13.8MB 1.2MB/s
Collecting pybind11==2.2.4 (from -r reqs.txt (line 4))
Downloading https://files.pythonhosted.org/packages/f2/7c/e71995e59e108799800cb0fce6c4b4927914d7eada0723dd20bae3b51786/pybind11-2.2.4-py2.py3-none-any.whl (145kB)
100% |████████████████████████████████| 153kB 1.2MB/s
Collecting pyopencl==2018.2.2 (from -r reqs.txt (line 5))
Downloading https://files.pythonhosted.org/packages/bc/58/3ab1246e94986f1b6953e76d7ea7e69d2dbfef7b3f3874eded48524a024f/pyopencl-2018.2.2.tar.gz (341kB)
100% |████████████████████████████████| 348kB 1.1MB/s
Complete output from command python setup.py egg_info:
---------------------------------------------------------------------------
Pybind11 is not installed.
---------------------------------------------------------------------------
Very likely, the build process after this message will fail.
Simply press Ctrl+C and type
python -m pip install pybind11
to fix this. If you don't, the build will continue
in a few seconds.
[1] https://pybind11.readthedocs.io/en/stable/
---------------------------------------------------------------------------
Continuing in 1 seconds...
---------------------------------------------------------------------------
Mako is not installed.
---------------------------------------------------------------------------
That is not a problem, as most of PyOpenCL will be just fine
without it. Some higher-level parts of pyopencl (such as
pyopencl.reduction) will not function without the templating engine
Mako [1] being installed. If you would like this functionality to
work, you might want to install Mako after you finish
installing PyOpenCL.
Simply type
python -m pip install mako
either now or after the installation completes to fix this.
[1] http://www.makotemplates.org/
---------------------------------------------------------------------------
Hit Ctrl-C now if you'd like to think about the situation.
---------------------------------------------------------------------------
Continuing in 1 seconds...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-d25rz2_5/pyopencl/setup.py", line 353, in <module>
main()
File "/tmp/pip-install-d25rz2_5/pyopencl/setup.py", line 320, in main
language='c++',
File "/tmp/pip-install-d25rz2_5/pyopencl/aksetup_helper.py", line 41, in __init__
self._include_dirs = self.include_dirs
File "/tmp/pip-install-d25rz2_5/pyopencl/aksetup_helper.py", line 55, in get_include_dirs
return self._include_dirs + self.get_additional_include_dirs()
File "/tmp/pip-install-d25rz2_5/pyopencl/aksetup_helper.py", line 52, in get_additional_include_dirs
return [self.get_numpy_incpath()]
File "/tmp/pip-install-d25rz2_5/pyopencl/aksetup_helper.py", line 47, in get_numpy_incpath
file, pathname, descr = find_module("numpy")
File "/home/app/.venv/lib/python3.5/imp.py", line 296, in find_module
raise ImportError(_ERR_MSG.format(name), name=name)
ImportError: No module named 'numpy'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-d25rz2_5/pyopencl/
Принимая во внимание, что работает:
pip install numpy==1.15.4
pip install pybind11==2.2.4
pip install pyopencl==2018.2.2
работает как шарм. Есть идеи почему? Заранее спасибо.
--------- РЕДАКТИРОВАТЬ: ---------
Я также попробовал с pip-tools
без успеха ... В этом случае я создал файл requirements.in
:
numpy
pybind11
pyopencl
И запустил pip-compile
, который не работает с:
Traceback (most recent call last):
File "/home/app/.venv/bin/pip-compile", line 11, in <module>
sys.exit(cli())
File "/home/app/.venv/lib/python3.5/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/app/.venv/lib/python3.5/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/app/.venv/lib/python3.5/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/app/.venv/lib/python3.5/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/app/.venv/lib/python3.5/site-packages/piptools/scripts/compile.py", line 196, in cli
results = resolver.resolve(max_rounds=max_rounds)
File "/home/app/.venv/lib/python3.5/site-packages/piptools/resolver.py", line 101, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/home/app/.venv/lib/python3.5/site-packages/piptools/resolver.py", line 198, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/home/app/.venv/lib/python3.5/site-packages/piptools/resolver.py", line 284, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "/home/app/.venv/lib/python3.5/site-packages/piptools/repositories/pypi.py", line 217, in get_dependencies
self._dependencies_cache[ireq] = self.resolve_reqs(download_dir, ireq, wheel_cache)
File "/home/app/.venv/lib/python3.5/site-packages/piptools/repositories/pypi.py", line 183, in resolve_reqs
results = resolver._resolve_one(reqset, ireq)
File "/home/app/.venv/lib/python3.5/site-packages/pip/_internal/resolve.py", line 256, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "/home/app/.venv/lib/python3.5/site-packages/pip/_internal/resolve.py", line 209, in _get_abstract_dist_for
self.require_hashes
File "/home/app/.venv/lib/python3.5/site-packages/pip/_internal/operations/prepare.py", line 298, in prepare_linked_requirement
abstract_dist.prep_for_dist(finder, self.build_isolation)
File "/home/app/.venv/lib/python3.5/site-packages/pip/_internal/operations/prepare.py", line 126, in prep_for_dist
self.req.run_egg_info()
File "/home/app/.venv/lib/python3.5/site-packages/pip/_internal/req/req_install.py", line 473, in run_egg_info
command_desc='python setup.py egg_info')
File "/home/app/.venv/lib/python3.5/site-packages/pip/_internal/utils/misc.py", line 705, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmp0ykgmwk4build/pyopencl/