Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/309.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python Requirements.txt与弹性豆茎上的conda/pip无效_Python_Amazon Web Services - Fatal编程技术网

Python Requirements.txt与弹性豆茎上的conda/pip无效

Python Requirements.txt与弹性豆茎上的conda/pip无效,python,amazon-web-services,Python,Amazon Web Services,有可能它不喜欢康达和皮普的混合吗?它说我的pip已经过时了,但事实上,在我的本地机器上是7.1.2 我正在尝试将带有numpy、scipy等的flask应用程序部署到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

有可能它不喜欢康达和皮普的混合吗?它说我的pip已经过时了,但事实上,在我的本地机器上是7.1.2

我正在尝试将带有numpy、scipy等的flask应用程序部署到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)
这是我的需求文件,上面说无效:

# 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
#此文件可用于创建环境,使用:
#$conda create--name--file
#平台:osx-64
_许可证=1.1=py27_0
抽象呈现=0.5.1=np19py27_0
雪花石膏=0.7.3=py27_0
蟒蛇=2.3.0=np19py27_0
appscript=1.0.1=py27_0
argcomplete=0.8.9=py27_0
astropy=1.0.3=np19py27_0
巴别塔=1.3=py27_0
bcolz=0.9.0=np19py27_0
靓汤=4.3.2=py27_0
binstar=0.11.0=py27_0
位数组=0.8.1=py27_0
火焰芯=0.8.0=np19py27_0
blz=0.6.2=np19py27_1
波基=0.9.0=np19py27_0
boto=2.38.0=py27_0
瓶颈=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
加密=0.9.1=py27_0
旋度=7.43.0=0
cython=0.22.1=py27_0
cytoolz=0.7.3=py27_0
数据形状=0.4.5=np19py27_0
装饰器=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
烧瓶=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笔记本=3.2.0=py27_0
ipython qtconsole=3.2.0=py27_0
危险系数=0.24=py27_0
jdcal=1.0=py27_0
绝地=0.8.1=py27_0
jinja2=2.7.3=py27_1
jpeg=8d=1
jsonschema=2.4.0=py27_0
启动器=1.0.0=3
libdynd=0.6.5=0
libpng=1.6.17=0
锂钠=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
失谐=0.5.1=py27_1
模拟=1.0.1=py27_0
乘数=0.4.7=py27_0
networkx=1.9.1=py27_0
nltk=3.0.3=np19py27_0
节点webkit=0.10.1=0
鼻子=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
熊猫=0.16.2=np19py27_0
patsy=0.3.0=np19py27_0
pep8=1.6.2=py27_0
枕头=2.8.2=py27_0
pip=7.1.2=py27_0
厚度=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
读线=6.2=2
redis=2.6.9=0
redis py=2.10.3=py27_0
请求=2.7.0=py27_0
绳索=0.9.4=py27_1
runipy=0.1.3=py27_0
scikit图像=0.11.3=np19py27_0
scikit学习=0.16.1=np19py27_0
scipy=0.15.1=np19py27_0
setuptools=18.4=py27_0
sip=4.16.5=py27_0
六=1.9.0=py27_0
snowballstemmer=1.2.0=py27_0
sockjs tornado=1.0.1=py27_0
斯芬克斯=1.3.1=py27_0
斯芬克斯主题=0.1.7=py27\u 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_匹配_主机名=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
龙卷风=4.2=py27_0
ujson=1.33=py27_0
Unicodesv=0.9.4=py27_0
werkzeug=0.10.4=py27_0
车轮=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

您的
requirements.txt
文件无效(至少对于
pip
)。如果你看标题,上面写着

# This file may be used to create an environment using:
# $ conda create --name <env> --file <this file>
# platform: osx-64

通常最好假设它说的是实话。您可能在本地使用7.1.2,但该脚本是否在本地运行(或者可能在安装了较旧的
pip
的EBS实例上运行?

不确定这是pip
requirements.txt
格式还是Conda的内部格式。我从未两次在行中看到带=的需求。与此相同的问题是:它是由冻结创建的conda environment.yml文件格式。我发现使用它的唯一有效方法是创建一个全新的环境,这可能在顶部指定。因此,如果这个项目名为'environment.yml',环境名称为myenv,那么我会;~$conda env remove——名称myenv;康达环境创建。瞧!将创建新的conda环境。
You are using pip version 7.0.3, however version 7.1.2 is available