I've got a build that's failing, and I've spent the better part of two days tracking down and fixing multiple problems with the build machine. Now it's getting stuck on a part that makes no sense, because what it's doing doesn't seem to follow from the input.
It's running dpkg-buildpackage, and erroring out on the fakeroot debian/build binary step. Here's the part of the build log where it fails:
Collecting lazy-object-proxy (from astroid==1.5.2->-r ./requirements.txt (line 2))
0 location(s) to search for versions of lazy-object-proxy:
Could not find a version that satisfies the requirement lazy-object-proxy (from astroid==1.5.2->-r ./requirements.txt (line 2)) (from versions: )
Cleaning up...
Removing source in /tmp/user/1000/pip-build-5s7d8it1/gevent
Removing source in /tmp/user/1000/pip-build-5s7d8it1/greenlet
Removing source in /tmp/user/1000/pip-build-5s7d8it1/Pillow
Removing source in /tmp/user/1000/pip-build-5s7d8it1/PyYAML
Removing source in /tmp/user/1000/pip-build-5s7d8it1/wrapt
No matching distribution found for lazy-object-proxy (from astroid==1.5.2->-r ./requirements.txt (line 2))
Exception information:
Traceback (most recent call last):
File "/home/username/project-a/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/commands/install.py", line 291, in run
wb.build(autobuilding=True)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/wheel.py", line 704, in build
self.requirement_set.prepare_files(self.finder)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/req/req_set.py", line 317, in prepare_files
functools.partial(self._prepare_file, finder))
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/req/req_set.py", line 304, in _walk_req_to_install
more_reqs = handler(req_to_install)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/req/req_set.py", line 439, in _prepare_file
req_to_install.populate_link(finder, self.upgrade)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/req/req_install.py", line 244, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/home/username/project-name/debian/project-name/opt/company-name/project-name/lib/python3.5/site-packages/pip/index.py", line 563, in find_requirement
'No matching distribution found for %s' % req
pip.exceptions.DistributionNotFound: No matching distribution found for lazy-object-proxy (from astroid==1.5.2->-r ./requirements.txt (line 2))
Traceback (most recent call last):
File "/usr/bin/dh_virtualenv", line 106, in <module>
sys.exit(main() or 0)
File "/usr/bin/dh_virtualenv", line 86, in main
deploy.install_dependencies()
File "/usr/lib/python2.7/dist-packages/dh_virtualenv/deployment.py", line 165, in install_dependencies
subprocess.check_call(self.pip('-r', requirements_path))
File "/usr/lib/python2.7/subprocess.py", line 511, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/username/project-name/debian/project-name/opt/company-name/project-name/bin/python', '/home/username/project-name/debian/project-name/opt/company-name/project-name/bin/pip', '-v', 'install', '--log=/tmp/user/1000/tmpYI75My', '--no-index', '--find-links=pypi', '-r', './requirements.txt']' returned non-zero exit status 1
make[1]: *** [override_dh_virtualenv] Error 1
make[1]: Leaving directory `/home/username/project-name'
make: *** [binary] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
Traceback (most recent call last):
File "./build-dpkg", line 116, in <module>
sys.exit(main(args=sys.argv[1:]))
File "./build-dpkg", line 34, in main
build_package()
File "./build-dpkg", line 104, in build_package
check_call('dpkg-buildpackage -us -uc'.split())
File "/usr/lib/python3.5/subprocess.py", line 581, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['dpkg-buildpackage', '-us', '-uc']' returned non-zero exit status 2
Here's the rules file it's trying to execute:
#!/usr/bin/make -f
%:
dh $# --with python-virtualenv
override_dh_virtualenv:
DH_VIRTUALENV_INSTALL_ROOT=/opt/company-name dh_virtualenv --python=/usr/bin/python3.5 --extra-pip-arg --no-index \
--extra-pip-arg --find-links=pypi -v --no-test
We have a pypi folder that houses local copies of dependencies. Both astroid and lazy-object-proxy are present in this folder.
Looking at the output, it appears that the command it's trying to run that's failing is:
/home/username/project-name/debian/project-name/opt/company-name/project-name/bin/python /home/username/project-name/debian/project-name/opt/company-name/project-name/bin/pip -v install --no-index --find-links=pypi -r ./requirements.txt
If I run that same command on the command line, I can reproduce the failure. But if I change the first part (the executable name with the long path) to simply "python", everything runs as expected. But I can't see why it's using that long path in the first place, when the environment specifies --python=/usr/bin/python3.5!
Does anyone have any idea where this rogue Python invocation is coming from, and how I can fix it?
Related
I'm trying to install python-binance libs on my MacBook M1 (learning python and crypto)... had same kind of issues with TA-Lib but fixed that with brew install
I keep getting
renaatvandewiele#Renaats-MBP Pythontrade % sudo -H python3.9 -m pip install python-binance Password: Collecting python-binance Using cached python_binance-0.7.9-py2.py3-none-any.whl (36 kB) Requirement already satisfied: requests in /opt/homebrew/lib/python3.9/site-packages (from python-binance) (2.25.1) Collecting service-identity Using cached service_identity-18.1.0-py2.py3-none-any.whl (11 kB) Collecting cryptography Using cached cryptography-3.4.6.tar.gz (546 kB) Installing build dependencies ... done Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/python#3.9/bin/python3.9 /opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp9xr5jjee
cwd: /private/tmp/pip-install-nvlbt5or/cryptography_372649a7a69d4e9ab469653b0c8c59e7
Complete output (58 lines):
=============================DEBUG ASSISTANCE=============================
If you are seeing a compilation error please try the following steps to
successfully install cryptography:
1) Upgrade to the latest pip and try again. This will fix errors for most
users. See: https://pip.pypa.io/en/stable/installing/#upgrading-pip
2) Read https://cryptography.io/en/latest/installation.html for specific
instructions for your platform.
3) Check our frequently asked questions for more information:
https://cryptography.io/en/latest/faq.html
4) Ensure you have a recent Rust toolchain installed:
https://cryptography.io/en/latest/installation.html#rust
5) If you are experiencing issues with Rust for *this release only* you may
set the environment variable `CRYPTOGRAPHY_DONT_BUILD_RUST=1`.
=============================DEBUG ASSISTANCE=============================
Traceback (most recent call last):
File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 280, in <module>
main()
File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py", line 133, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 161, in prepare_metadata_for_build_wheel
self.run_setup()
File "/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 145, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 71, in <module>
setup(
File "/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 153, in setup
return distutils.core.setup(**attrs)
File "/opt/homebrew/Cellar/python#3.9/3.9.1_8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 432, in __init__
_Distribution.__init__(self, {
File "/opt/homebrew/Cellar/python#3.9/3.9.1_8/Frameworks/Python.framework/Versions/3.9/lib/python3.9/distutils/dist.py", line 292, in __init__
self.finalize_options()
File "/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 708, in finalize_options
ep(self)
File "/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 715, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/cffi/setuptools_ext.py", line 219, in cffi_modules
add_cffi_module(dist, cffi_module)
File "/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/cffi/setuptools_ext.py", line 49, in add_cffi_module
execfile(build_file_name, mod_vars)
File "/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/cffi/setuptools_ext.py", line 25, in execfile
exec(code, glob, glob)
File "src/_cffi_src/build_openssl.py", line 76, in <module>
ffi = build_ffi_for_binding(
File "src/_cffi_src/utils.py", line 53, in build_ffi_for_binding
ffi = build_ffi(
File "src/_cffi_src/utils.py", line 73, in build_ffi
ffi = FFI()
File "/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/cffi/api.py", line 48, in __init__
import _cffi_backend as backend
ImportError: dlopen(/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/_cffi_backend.cpython-39-darwin.so, 2): no suitable image found. Did find:
/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/_cffi_backend.cpython-39-darwin.so: mach-o, but wrong architecture
/private/tmp/pip-build-env-kijhr80e/overlay/lib/python3.9/site-packages/_cffi_backend.cpython-39-darwin.so: mach-o, but wrong architecture
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/fa/2d/2154d8cb773064570f48ec0b60258a4522490fcb115a6c7c9423482ca993/cryptography-3.4.6.tar.gz#sha256=2d32223e5b0ee02943f32b19245b61a62db83a882f0e76cc564e1cec60d48f87 (from https://pypi.org/simple/cryptography/) (requires-python:>=3.6). Command errored out with exit status 1: /opt/homebrew/opt/python#3.9/bin/python3.9 /opt/homebrew/lib/python3.9/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp9xr5jjee Check the logs for full command output.
Using cached cryptography-3.4.5.tar.gz (546 kB)
cryptography does not currently ship an arm64 macOS wheel (due to no CI being available). To install it successfully you will need to follow the instructions here: https://cryptography.io/en/latest/installation.html#building-cryptography-on-macos
I'm trying to start a Pinax Project for Django.
I setup my Python Virtual Environment.
Upgraded setup tools.
Upgraded pip.
Installed Pinax.
Then when I tried 'pinax start blog my_site', it gave the following error:
Installing Django...
Traceback (most recent call last):
File "/usr/local/bin/pinax", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 700, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 680, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1027, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 873, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/decorators.py", line 63, in new_func
return ctx.invoke(f, obj, *args[1:], **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 508, in invoke
return callback(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/pcli.py", line 97, in start
pip_install("Django")
File "/usr/local/lib/python2.7/dist-packages/pcli.py", line 23, in pip_install
command.run(opts, [package])
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 335, in run
wb.build(autobuilding=True)
File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/usr/local/lib/python2.7/dist-packages/pip/req/req_install.py", line 439, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 707, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-Jr1szu/Django/
I've tried making a python virtual environment inside my conda environment. Also tried making a standalone python environment. Neither solved it. Also tried installing django using pip.
Gave the following error:
sudo pip install django
The directory '/home/scarlet/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/scarlet/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting django
Downloading Django-2.0.tar.gz (8.0MB)
100% |████████████████████████████████| 8.0MB 62kB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-SNP9W5/django/setup.py", line 32, in <module>
version = __import__('django').get_version()
File "django/__init__.py", line 1, in <module>
from django.utils.version import get_version
File "django/utils/version.py", line 61, in <module>
#functools.lru_cache()
AttributeError: 'module' object has no attribute 'lru_cache'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-SNP9W5/django/
What would you suggest?
Thank you for the read!
It appears like you are using python 2; if that is correct Django version 2 only supports python 3. Please refer to https://docs.djangoproject.com/en/2.0/releases/2.0/#python-compatibility
You could try installing a lower version of Django:
pip install "Django<2"
you may try:
pip3 install django
I am trying to install graphite carbon (version 0.9.15) requirements by running the following command:
pip --proxy http://<proxy-host>:<proxy-port> install -r requirements.txt
The requirements.txt has the following contents:
Twisted>=13.2.0
git+git://github.com/graphite-project/whisper.git#0.9.13#egg=whisper
mocker==1.1.1
mock
However when I run the above command I get:
Collecting Twisted>=13.2.0 (from -r requirements.txt (line 1))
Using cached Twisted-16.6.0.tar.bz2
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/incremental/: [Errno 101] Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'incremental' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno 101] Network is unreachable -- Some packages may not be found!
No local packages or download links found for incremental>=16.10.1
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-6klpfA/Twisted/setup.py", line 21, in <module>
setuptools.setup(**_setup["getSetupArgs"]())
File "/usr/lib64/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/opt/graphite/lib/python2.7/site-packages/setuptools/dist.py", line 269, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/opt/graphite/lib/python2.7/site-packages/setuptools/dist.py", line 313, in fetch_build_eggs
replace_conflicting=True,
File "/opt/graphite/lib/python2.7/site-packages/pkg_resources/__init__.py", line 827, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/opt/graphite/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1072, in best_match
return self.obtain(req, installer)
File "/opt/graphite/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1084, in obtain
return installer(requirement)
File "/opt/graphite/lib/python2.7/site-packages/setuptools/dist.py", line 380, in fetch_build_egg
return cmd.easy_install(req)
File "/opt/graphite/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 634, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incremental>=16.10.1')
The strange thing is that when accessing the https://pypi.python.org/simple/incremental/ index page through the proxy I can see there is an incremental-16.10.1.tar.gz package.
What could be the issue here? Is this something network-related problem or a pip-related one?
I have a package that I submitted to Pypi using the python setup.py register command:
https://bitbucket.org/lskibinski/et3
You can see it here:
https://pypi.python.org/pypi?name=et3&version=1.0&:action=display
However, for some mysterious reason, pip install et3 doesn't work. The error I get is:
$ pip install et3 -vvv --no-cache-dir
Collecting et3
1 location(s) to search for versions of et3:
* https://pypi.python.org/simple/et3/
Getting page https://pypi.python.org/simple/et3/
Starting new HTTPS connection (1): pypi.python.org
"GET /simple/et3/ HTTP/1.1" 200 111
Analyzing links from page https://pypi.python.org/simple/et3/
Could not find a version that satisfies the requirement et3 (from versions: )
Cleaning up...
No matching distribution found for et3
Exception information:
Traceback (most recent call last):
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/commands/install.py", line 299, in run
requirement_set.prepare_files(finder)
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/req/req_set.py", line 370, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/req/req_set.py", line 522, in _prepare_file
finder, self.upgrade, require_hashes)
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/req/req_install.py", line 268, in populate_link
self.link = finder.find_requirement(self, upgrade)
File "/home/luke/dev/python/lax/venv/lib/python2.7/site-packages/pip/index.py", line 491, in find_requirement
'No matching distribution found for %s' % req
DistributionNotFound: No matching distribution found for et3
It seems like it can't find any versions to download. Do I need to specify something more than download_url? Are further manual steps required?
ok, figured it out. download_url doesn't appear to do much at all. I had to do:
python setup.py register
python setup.py sdist upload
... and it now works. The documentation for all of this is terrible.
Is it possible that it doesnt like the mixing of conda/pip? It says my pip is out of date, but in fact it's at 7.1.2 on my local machine.
I am trying to deploy a flask app with numpy, scipy, etc to aws
AppDeployPreHook/03deploy.py] : Activity execution failed, because: You are using pip version 7.0.3, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Exception:
Traceback (most recent call last):
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/commands/install.py", line 268, in run
wheel_cache
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 287, in populate_requirement_set
wheel_cache=wheel_cache):
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/req/req_file.py", line 86, in parse_requirements
for req in req_iter:
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/req/req_file.py", line 130, in process_line
wheel_cache=wheel_cache
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/req/req_install.py", line 207, in from_line
wheel_cache=wheel_cache)
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/req/req_install.py", line 66, in __init__
req = pkg_resources.Requirement.parse(req)
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2960, in parse
reqs = list(parse_requirements(s))
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2904, in parse_requirements
"version spec")
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2869, in scan_list
raise ValueError(msg, line, "at", line[p:])
ValueError: ('Expected version spec in', '_license=1.1=py27_0', 'at', '=1.1=py27_0')
2015-10-16 01:37:43,439 ERROR Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 2
Traceback (most recent call last):
File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 22, in main
install_dependencies()
File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 18, in install_dependencies
check_call('%s install -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
File "/usr/lib64/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 2 (ElasticBeanstalk::ExternalInvocationError)
caused by: You are using pip version 7.0.3, however version 7.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Exception:
Traceback (most recent call last):
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 223, in main
status = self.run(options, args)
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/commands/install.py", line 268, in run
wheel_cache
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 287, in populate_requirement_set
wheel_cache=wheel_cache):
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/req/req_file.py", line 86, in parse_requirements
for req in req_iter:
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/req/req_file.py", line 130, in process_line
wheel_cache=wheel_cache
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/req/req_install.py", line 207, in from_line
wheel_cache=wheel_cache)
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/req/req_install.py", line 66, in __init__
req = pkg_resources.Requirement.parse(req)
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2960, in parse
reqs = list(parse_requirements(s))
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2904, in parse_requirements
"version spec")
File "/opt/python/run/venv/local/lib/python2.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2869, in scan_list
raise ValueError(msg, line, "at", line[p:])
ValueError: ('Expected version spec in', '_license=1.1=py27_0', 'at', '=1.1=py27_0')
2015-10-16 01:37:43,439 ERROR Error installing dependencies: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 2
Traceback (most recent call last):
File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 22, in main
install_dependencies()
File "/opt/elasticbeanstalk/hooks/appdeploy/pre/03deploy.py", line 18, in install_dependencies
check_call('%s install -r %s' % (os.path.join(APP_VIRTUAL_ENV, 'bin', 'pip'), requirements_file), shell=True)
File "/usr/lib64/python2.7/subprocess.py", line 540, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '/opt/python/run/venv/bin/pip install -r /opt/python/ondeck/app/requirements.txt' returned non-zero exit status 2 (Executor::NonZeroExitStatus)
Here is my requirements file, which it says is invalid:
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: osx-64
_license=1.1=py27_0
abstract-rendering=0.5.1=np19py27_0
alabaster=0.7.3=py27_0
anaconda=2.3.0=np19py27_0
appscript=1.0.1=py27_0
argcomplete=0.8.9=py27_0
astropy=1.0.3=np19py27_0
babel=1.3=py27_0
bcolz=0.9.0=np19py27_0
beautiful-soup=4.3.2=py27_0
binstar=0.11.0=py27_0
bitarray=0.8.1=py27_0
blaze-core=0.8.0=np19py27_0
blz=0.6.2=np19py27_1
bokeh=0.9.0=np19py27_0
boto=2.38.0=py27_0
bottleneck=1.0.0=np19py27_0
cdecimal=2.3=py27_0
certifi=14.05.14=py27_0
cffi=1.1.0=py27_0
clyent=0.3.4=py27_0
colorama=0.3.3=py27_0
configobj=5.0.6=py27_0
cryptography=0.9.1=py27_0
curl=7.43.0=0
cython=0.22.1=py27_0
cytoolz=0.7.3=py27_0
datashape=0.4.5=np19py27_0
decorator=3.4.2=py27_0
docutils=0.12=py27_0
dynd-python=0.6.5=np19py27_0
enum34=1.0.4=py27_0
fastcache=1.0.2=py27_0
flask=0.10.1=py27_1
freetype=2.5.2=2
funcsigs=0.4=py27_0
gevent=1.0.1=py27_0
gevent-websocket=0.9.3=py27_0
greenlet=0.4.7=py27_0
grin=1.2.1=py27_1
h5py=2.5.0=np19py27_3
hdf5=1.8.15.1=1
idna=2.0=py27_0
ipaddress=1.0.7=py27_0
ipython=3.2.0=py27_0
ipython-notebook=3.2.0=py27_0
ipython-qtconsole=3.2.0=py27_0
itsdangerous=0.24=py27_0
jdcal=1.0=py27_0
jedi=0.8.1=py27_0
jinja2=2.7.3=py27_1
jpeg=8d=1
jsonschema=2.4.0=py27_0
launcher=1.0.0=3
libdynd=0.6.5=0
libpng=1.6.17=0
libsodium=0.4.5=0
libtiff=4.0.2=1
libxml2=2.9.2=0
libxslt=1.1.28=2
llvmlite=0.5.0=py27_0
lxml=3.4.4=py27_0
markupsafe=0.23=py27_0
matplotlib=1.4.3=np19py27_2
mistune=0.5.1=py27_1
mock=1.0.1=py27_0
multipledispatch=0.4.7=py27_0
networkx=1.9.1=py27_0
nltk=3.0.3=np19py27_0
node-webkit=0.10.1=0
nose=1.3.7=py27_0
numba=0.19.1=np19py27_0
numexpr=2.4.3=np19py27_0
numpy=1.9.2=py27_0
odo=0.3.2=np19py27_0
openpyxl=1.8.5=py27_0
openssl=1.0.1k=1
pandas=0.16.2=np19py27_0
patsy=0.3.0=np19py27_0
pep8=1.6.2=py27_0
pillow=2.8.2=py27_0
pip=7.1.2=py27_0
ply=3.6=py27_0
psutil=2.2.1=py27_0
ptyprocess=0.4=py27_0
py=1.4.27=py27_0
pyasn1=0.1.7=py27_0
pyaudio=0.2.7=py27_0
pycosat=0.6.1=py27_0
pycparser=2.14=py27_0
pycrypto=2.6.1=py27_0
pycurl=7.19.5.1=py27_2
pyflakes=0.9.2=py27_0
pygments=2.0.2=py27_0
pyopenssl=0.15.1=py27_1
pyparsing=2.0.3=py27_0
pyqt=4.11.3=py27_0
pytables=3.2.0=np19py27_0
pytest=2.7.1=py27_0
python=2.7.10=1
python-dateutil=2.4.2=py27_0
python.app=1.2=py27_4
pytz=2015.4=py27_0
pyyaml=3.11=py27_1
pyzmq=14.7.0=py27_0
qt=4.8.6=3
readline=6.2=2
redis=2.6.9=0
redis-py=2.10.3=py27_0
requests=2.7.0=py27_0
rope=0.9.4=py27_1
runipy=0.1.3=py27_0
scikit-image=0.11.3=np19py27_0
scikit-learn=0.16.1=np19py27_0
scipy=0.15.1=np19py27_0
setuptools=18.4=py27_0
sip=4.16.5=py27_0
six=1.9.0=py27_0
snowballstemmer=1.2.0=py27_0
sockjs-tornado=1.0.1=py27_0
sphinx=1.3.1=py27_0
sphinx_rtd_theme=0.1.7=py27_0
spyder=2.3.5.2=py27_0
spyder-app=2.3.5.2=py27_0
sqlalchemy=1.0.5=py27_0
sqlite=3.8.4.1=1
ssl_match_hostname=3.4.0.2=py27_0
statsmodels=0.6.1=np19py27_0
sympy=0.7.6=py27_0
terminado=0.5=py27_0
tk=8.5.18=0
toolz=0.7.2=py27_0
tornado=4.2=py27_0
ujson=1.33=py27_0
unicodecsv=0.9.4=py27_0
werkzeug=0.10.4=py27_0
wheel=0.26.0=py27_1
xlrd=0.9.3=py27_0
xlsxwriter=0.7.3=py27_0
xlwings=0.3.5=py27_0
xlwt=1.0.0=py27_0
yaml=0.1.6=0
zeromq=4.0.5=0
zlib=1.2.8=0
Your requirements.txt file is invalid (at least for pip). If you look at the header it says;
# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: osx-64
You'll have to re-format this list for pip (remove the extra =npXYpyAB_Z blah as #mikko-ohtamaa mentioned, also rename the non-valid conda packages - _licence), or you'll need to work out how to get EBS to work from a conda environment.
Aside, you see a warning like
You are using pip version 7.0.3, however version 7.1.2 is available
it's generally best to assume it's telling the truth. Maybe you might have 7.1.2 locally, but is this script being run locally (or possibly on an EBS instance with an older pip installed...)?