Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/361.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 pip install requirements.txt工作不正常_Python_Django_Git_Unix - Fatal编程技术网

Python pip install requirements.txt工作不正常

Python pip install requirements.txt工作不正常,python,django,git,unix,Python,Django,Git,Unix,我正在尝试在Digital Ocean Django服务器上安装所有Python/Django软件包。我在根目录中有我的requirements.txt,因此我执行pip安装-r requirements.txt,但是它不起作用。这是我的requirements.txt: amqp==2.2.2 billiard==3.5.0.3 celery==4.1.0 coverage==4.4.2 decorator==4.0.11 defusedxml==0.4.1 Django==1.11.8 dj

我正在尝试在Digital Ocean Django服务器上安装所有Python/Django软件包。我在根目录中有我的
requirements.txt
,因此我执行
pip安装-r requirements.txt
,但是它不起作用。这是我的
requirements.txt

amqp==2.2.2
billiard==3.5.0.3
celery==4.1.0
coverage==4.4.2
decorator==4.0.11
defusedxml==0.4.1
Django==1.11.8
django-allauth==0.29.0
django-apptemplates==1.2
django-celery-beat==1.0.1
django-common-helpers==0.9.1
django-cron==0.5.0
django-el-pagination==3.1.0
django-fs-trumbowyg==0.1.4
django-markdown-deux==1.0.5
django-trumbowyg==1.0.1
django-widget-tweaks==1.4.1
get==0.0.0
imageio==2.1.2
kombu==4.1.0
markdown2==2.3.1
moviepy==0.2.3.2
numpy==1.13.3
oauthlib==2.0.1
olefile==0.44
Pillow==4.0.0
post==0.0.0
public==0.0.0
python-magic==0.4.12
python3-openid==3.0.10
pytz==2017.3
query-string==0.0.0
request==0.0.0
requests==2.11.1
requests-oauthlib==0.7.0
schedule==0.4.3
setupfiles==0.0.0
tqdm==4.11.2
vine==1.1.4
这是日志:

Collecting amqp==2.2.2 (from -r requirements.txt (line 1))
  Using cached amqp-2.2.2-py2.py3-none-any.whl
Collecting billiard==3.5.0.3 (from -r requirements.txt (line 2))
  Using cached billiard-3.5.0.3-py3-none-any.whl
Collecting celery==4.1.0 (from -r requirements.txt (line 3))
  Using cached celery-4.1.0-py2.py3-none-any.whl
Collecting coverage==4.4.2 (from -r requirements.txt (line 4))
  Using cached coverage-4.4.2-cp35-cp35m-manylinux1_x86_64.whl
Collecting decorator==4.0.11 (from -r requirements.txt (line 5))
  Using cached decorator-4.0.11-py2.py3-none-any.whl
Collecting defusedxml==0.4.1 (from -r requirements.txt (line 6))
  Using cached defusedxml-0.4.1.tar.gz
Requirement already satisfied: Django==1.11.8 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 7))
Collecting django-allauth==0.29.0 (from -r requirements.txt (line 8))
  Using cached django-allauth-0.29.0.tar.gz
Collecting django-apptemplates==1.2 (from -r requirements.txt (line 9))
  Using cached django-apptemplates-1.2.tar.gz
Collecting django-celery-beat==1.0.1 (from -r requirements.txt (line 10))
  Using cached django_celery_beat-1.0.1-py2.py3-none-any.whl
Collecting django-common-helpers==0.9.1 (from -r requirements.txt (line 11))
  Using cached django-common-helpers-0.9.1.tar.gz
Collecting django-cron==0.5.0 (from -r requirements.txt (line 12))
  Using cached django-cron-0.5.0.tar.gz
Collecting django-el-pagination==3.1.0 (from -r requirements.txt (line 13))
  Using cached django-el-pagination-3.1.0.tar.gz
Collecting django-fs-trumbowyg==0.1.4 (from -r requirements.txt (line 14))
  Using cached django-fs-trumbowyg-0.1.4.tar.gz
Collecting django-markdown-deux==1.0.5 (from -r requirements.txt (line 15))
  Using cached django-markdown-deux-1.0.5.zip
Requirement already satisfied: django-trumbowyg==1.0.3 in ./env/lib/python3.5/site-packages (from -r requirements.txt (line 16))
Collecting django-widget-tweaks==1.4.1 (from -r requirements.txt (line 17))
  Using cached django_widget_tweaks-1.4.1-py2.py3-none-any.whl
Collecting get==0.0.0 (from -r requirements.txt (line 18))
  Using cached get-0.0.0.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/james/postr/env/lib/python3.5/tokenize.py", line 454, in open
        buffer = _builtin_open(filename, 'rb')
    IsADirectoryError: [Errno 21] Is a directory: '/tmp/pip-build-9eo5rb8l/get/setup.py'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-9eo5rb8l/get/

这表明他们都没有成功。我使用
pip install django trumbowyg
手动安装了
django trumbowyg
,这就是为什么会出现这种情况,但其他人只有在设置django服务器时才会出现。那么为什么
pip install-r requirements.txt
不起作用,我如何修复它呢?

您正在尝试安装get的0.0.0版本


您应该在requirements.txt中指定正确的版本号

库有时可能会出现问题

只需编辑
requirements.txt.
删除遇到问题的软件包中的版本号即可

django-widget-tweaks==1.4.1
get
imageio==2.1.2
  • 您应该在
    requirements.txt
    中修复软件包版本
  • 从日志中可以看出,pip正在某处使用模块的缓存版本,您可能应该尝试
    --no cache dir
    选项

  • 查看您的所有版本
    0.0.0
    依赖项:它们只包含几行琐碎的代码,而且
    setupfiles
    似乎已从pypi中删除。你确定你需要吗?谢谢。我必须完全删除
    setupfiles
    ,因为
    setupfiles
    setupfiles==0.0.0
    都给出了一个错误。你知道这个软件包的功能和我需要的版本吗?“我试过看,但它似乎是一个死包。@佐尔根,我认为你在任何时候都不需要那个包。”。在某些项目中需要
    setuptools
    ,但不需要
    setupfiles
    。我不知道它到底是做什么的,也不知道它是如何安装的,是如何进入
    requirements.txt
    django-widget-tweaks==1.4.1
    get
    imageio==2.1.2