Django cookiecutter with Docker add pip package - docker-compose

I have created a Django project with cookiecutter-django by PyDanny with Docker.
This is inside a virtualenvwrapper and I use docker-compose.
No I am trying to install a package (django-admin-bootstrapped).
I added django-admin-bootstrapped in 2 locations.
project_root/config/settings/common.py
DJANGO_APPS = (
# Default Django apps:
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# Admin
'django-admin-bootstrapped',
'django.contrib.admin',
)
And
project_root/requirements/base.txt
# Your custom requirements go here
django-admin-bootstrapped==2.5.7
after this I stop the server (within Pycharm) and run docker-compose -f dev.yml build.
In the messages it shows :
Running setup.py install for django-admin-bootstrapped: started
Running setup.py install for django-admin-bootstrapped: finished with status 'done'
The entire trace:
Building postgres
Step 1 : FROM postgres:9.5
---> 7ee9d2061970
Step 2 : ADD backup.sh /usr/local/bin/backup
---> Using cache
---> 4172481b25a5
Step 3 : ADD restore.sh /usr/local/bin/restore
---> Using cache
---> 67677d6f568a
Step 4 : ADD list-backups.sh /usr/local/bin/list-backups
---> Using cache
---> 960d5e4aa8e3
Step 5 : RUN chmod +x /usr/local/bin/restore
---> Using cache
---> a2ebe8145fbf
Step 6 : RUN chmod +x /usr/local/bin/list-backups
---> Using cache
---> 0827ac792a0b
Step 7 : RUN chmod +x /usr/local/bin/backup
---> Using cache
---> 0a678483ed72
Successfully built 0a678483ed72
Building django
Step 1 : FROM python:3.5
---> 7fd24fb1b492
Step 2 : ENV PYTHONUNBUFFERED 1
---> Using cache
---> 78e28bdf617f
Step 3 : COPY ./requirements /requirements
---> Using cache
---> 27e5784b3d1b
Step 4 : RUN pip install -r /requirements/local.txt
---> Running in 75445ffa29e0
Collecting wheel==0.29.0 (from -r /requirements/base.txt (line 5))
Downloading wheel-0.29.0-py2.py3-none-any.whl (66kB)
Collecting django==1.9.7 (from -r /requirements/base.txt (line 9))
Downloading Django-1.9.7-py2.py3-none-any.whl (6.6MB)
Collecting django-environ==0.4.0 (from -r /requirements/base.txt (line 13))
Downloading django-environ-0.4.0.tar.gz
Collecting django-braces==1.9.0 (from -r /requirements/base.txt (line 17))
Downloading django_braces-1.9.0-py2.py3-none-any.whl
Collecting django-crispy-forms==1.6.0 (from -r /requirements/base.txt (line 18))
Downloading django-crispy-forms-1.6.0.tar.gz (118kB)
Collecting django-floppyforms==1.6.2 (from -r /requirements/base.txt (line 19))
Downloading django-floppyforms-1.6.2.tar.gz (2.4MB)
Collecting django-model-utils==2.5 (from -r /requirements/base.txt (line 23))
Downloading django-model-utils-2.5.tar.gz
Collecting Pillow==3.3.0 (from -r /requirements/base.txt (line 27))
Downloading Pillow-3.3.0-cp35-cp35m-manylinux1_x86_64.whl (5.5MB)
Collecting django-allauth==0.25.2 (from -r /requirements/base.txt (line 32))
Downloading django-allauth-0.25.2.tar.gz (408kB)
Collecting psycopg2==2.6.2 (from -r /requirements/base.txt (line 36))
Downloading psycopg2-2.6.2.tar.gz (376kB)
Collecting unicode-slugify==0.1.3 (from -r /requirements/base.txt (line 40))
Downloading unicode-slugify-0.1.3.tar.gz
Collecting django-autoslug==1.9.3 (from -r /requirements/base.txt (line 41))
Downloading django_autoslug-1.9.3-py2.py3-none-any.whl
Collecting pytz==2016.4 (from -r /requirements/base.txt (line 45))
Downloading pytz-2016.4-py2.py3-none-any.whl (480kB)
Collecting django-redis==4.4.3 (from -r /requirements/base.txt (line 49))
Downloading django-redis-4.4.3.tar.gz (53kB)
Collecting redis>=2.10.0 (from -r /requirements/base.txt (line 50))
Downloading redis-2.10.5-py2.py3-none-any.whl (60kB)
Collecting django-admin-bootstrapped==2.5.7 (from -r /requirements/base.txt (line 53))
Downloading django-admin-bootstrapped-2.5.7.tar.gz (378kB)
Collecting coverage==4.1 (from -r /requirements/local.txt (line 4))
Downloading coverage-4.1.tar.gz (370kB)
Collecting django-coverage-plugin==1.3.1 (from -r /requirements/local.txt (line 5))
Downloading django_coverage_plugin-1.3.1.tar.gz
Collecting Sphinx==1.4.4 (from -r /requirements/local.txt (line 6))
Downloading Sphinx-1.4.4-py2.py3-none-any.whl (1.6MB)
Collecting django-extensions==1.6.7 (from -r /requirements/local.txt (line 7))
Downloading django_extensions-1.6.7-py2.py3-none-any.whl (206kB)
Collecting Werkzeug==0.11.10 (from -r /requirements/local.txt (line 8))
Downloading Werkzeug-0.11.10-py2.py3-none-any.whl (306kB)
Collecting django-test-plus==1.0.14 (from -r /requirements/local.txt (line 9))
Downloading django-test-plus-1.0.14.tar.gz
Collecting factory_boy==2.7.0 (from -r /requirements/local.txt (line 10))
Downloading factory_boy-2.7.0-py2.py3-none-any.whl
Collecting django-debug-toolbar==1.4 (from -r /requirements/local.txt (line 11))
Downloading django_debug_toolbar-1.4-py2.py3-none-any.whl (212kB)
Collecting ipdb==0.10.1 (from -r /requirements/local.txt (line 15))
Downloading ipdb-0.10.1.tar.gz
Collecting pytest-django==2.9.1 (from -r /requirements/local.txt (line 17))
Downloading pytest_django-2.9.1-py2.py3-none-any.whl
Collecting pytest-sugar==0.7.1 (from -r /requirements/local.txt (line 18))
Downloading pytest-sugar-0.7.1.tar.gz
Collecting six (from django-environ==0.4.0->-r /requirements/base.txt (line 13))
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting python3-openid>=3.0.8 (from django-allauth==0.25.2->-r /requirements/base.txt (line 32))
Downloading python3-openid-3.0.10.zip (365kB)
Collecting requests-oauthlib>=0.3.0 (from django-allauth==0.25.2->-r /requirements/base.txt (line 32))
Downloading requests_oauthlib-0.6.1-py2.py3-none-any.whl
Collecting requests>=1.0.3 (from django-allauth==0.25.2->-r /requirements/base.txt (line 32))
Downloading requests-2.10.0-py2.py3-none-any.whl (506kB)
Collecting unidecode (from unicode-slugify==0.1.3->-r /requirements/base.txt (line 40))
Downloading Unidecode-0.04.19.tar.gz (204kB)
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/local/lib/python3.5/site-packages (from django-admin-bootstrapped==2.5.7->-r /requirements/base.txt (line 53))
Collecting imagesize (from Sphinx==1.4.4->-r /requirements/local.txt (line 6))
Downloading imagesize-0.7.1-py2.py3-none-any.whl
Collecting alabaster<0.8,>=0.7 (from Sphinx==1.4.4->-r /requirements/local.txt (line 6))
Downloading alabaster-0.7.8-py2.py3-none-any.whl
Collecting docutils>=0.11 (from Sphinx==1.4.4->-r /requirements/local.txt (line 6))
Downloading docutils-0.12-py3-none-any.whl (508kB)
Collecting Pygments>=2.0 (from Sphinx==1.4.4->-r /requirements/local.txt (line 6))
Downloading Pygments-2.1.3-py2.py3-none-any.whl (755kB)
Collecting babel!=2.0,>=1.3 (from Sphinx==1.4.4->-r /requirements/local.txt (line 6))
Downloading Babel-2.3.4-py2.py3-none-any.whl (7.1MB)
Collecting snowballstemmer>=1.1 (from Sphinx==1.4.4->-r /requirements/local.txt (line 6))
Downloading snowballstemmer-1.2.1-py2.py3-none-any.whl (64kB)
Collecting Jinja2>=2.3 (from Sphinx==1.4.4->-r /requirements/local.txt (line 6))
Downloading Jinja2-2.8-py2.py3-none-any.whl (263kB)
Collecting fake-factory>=0.5.0 (from factory_boy==2.7.0->-r /requirements/local.txt (line 10))
Downloading fake_factory-0.5.9-py2.py3-none-any.whl (527kB)
Collecting sqlparse (from django-debug-toolbar==1.4->-r /requirements/local.txt (line 11))
Downloading sqlparse-0.1.19.tar.gz (58kB)
Collecting ipython>=0.10.2 (from ipdb==0.10.1->-r /requirements/local.txt (line 15))
Downloading ipython-5.0.0-py2.py3-none-any.whl (743kB)
Collecting pytest>=2.5 (from pytest-django==2.9.1->-r /requirements/local.txt (line 17))
Downloading pytest-2.9.2-py2.py3-none-any.whl (162kB)
Collecting termcolor>=1.1.0 (from pytest-sugar==0.7.1->-r /requirements/local.txt (line 18))
Downloading termcolor-1.1.0.tar.gz
Collecting defusedxml (from python3-openid>=3.0.8->django-allauth==0.25.2->-r /requirements/base.txt (line 32))
Downloading defusedxml-0.4.1.tar.gz (48kB)
Collecting oauthlib>=0.6.2 (from requests-oauthlib>=0.3.0->django-allauth==0.25.2->-r /requirements/base.txt (line 32))
Downloading oauthlib-1.1.2.tar.gz (111kB)
Collecting MarkupSafe (from Jinja2>=2.3->Sphinx==1.4.4->-r /requirements/local.txt (line 6))
Downloading MarkupSafe-0.23.tar.gz
Collecting python-dateutil>=2.4 (from fake-factory>=0.5.0->factory_boy==2.7.0->-r /requirements/local.txt (line 10))
Downloading python_dateutil-2.5.3-py2.py3-none-any.whl (201kB)
Collecting decorator (from ipython>=0.10.2->ipdb==0.10.1->-r /requirements/local.txt (line 15))
Downloading decorator-4.0.10-py2.py3-none-any.whl
Collecting traitlets>=4.2 (from ipython>=0.10.2->ipdb==0.10.1->-r /requirements/local.txt (line 15))
Downloading traitlets-4.2.2-py2.py3-none-any.whl (68kB)
Collecting pexpect; sys_platform != "win32" (from ipython>=0.10.2->ipdb==0.10.1->-r /requirements/local.txt (line 15))
Downloading pexpect-4.2.0-py2.py3-none-any.whl (56kB)
Collecting simplegeneric>0.8 (from ipython>=0.10.2->ipdb==0.10.1->-r /requirements/local.txt (line 15))
Downloading simplegeneric-0.8.1.zip
Collecting prompt-toolkit<2.0.0,>=1.0.3 (from ipython>=0.10.2->ipdb==0.10.1->-r /requirements/local.txt (line 15))
Downloading prompt_toolkit-1.0.3-py3-none-any.whl (249kB)
Collecting pickleshare (from ipython>=0.10.2->ipdb==0.10.1->-r /requirements/local.txt (line 15))
Downloading pickleshare-0.7.2-py2.py3-none-any.whl
Collecting py>=1.4.29 (from pytest>=2.5->pytest-django==2.9.1->-r /requirements/local.txt (line 17))
Downloading py-1.4.31-py2.py3-none-any.whl (81kB)
Collecting ipython-genutils (from traitlets>=4.2->ipython>=0.10.2->ipdb==0.10.1->-r /requirements/local.txt (line 15))
Downloading ipython_genutils-0.1.0-py2.py3-none-any.whl
Collecting ptyprocess>=0.5 (from pexpect; sys_platform != "win32"->ipython>=0.10.2->ipdb==0.10.1->-r /requirements/local.txt (line 15))
Downloading ptyprocess-0.5.1-py2.py3-none-any.whl
Collecting wcwidth (from prompt-toolkit<2.0.0,>=1.0.3->ipython>=0.10.2->ipdb==0.10.1->-r /requirements/local.txt (line 15))
Downloading wcwidth-0.1.7-py2.py3-none-any.whl
Installing collected packages: wheel, django, six, django-environ, django-braces, django-crispy-forms, django-floppyforms, django-model-utils, Pillow, defusedxml, python3-openid, oauthlib, requests, requests-oauthlib, django-allauth, psycopg2, unidecode, unicode-slugify, django-autoslug, pytz, redis, django-redis, django-admin-bootstrapped, coverage, django-coverage-plugin, imagesize, alabaster, docutils, Pygments, babel, snowballstemmer, MarkupSafe, Jinja2, Sphinx, django-extensions, Werkzeug, django-test-plus, python-dateutil, fake-factory, factory-boy, sqlparse, django-debug-toolbar, decorator, ipython-genutils, traitlets, ptyprocess, pexpect, simplegeneric, wcwidth, prompt-toolkit, pickleshare, ipython, ipdb, py, pytest, pytest-django, termcolor, pytest-sugar
Running setup.py install for django-environ: started
Running setup.py install for django-environ: finished with status 'done'
Running setup.py install for django-crispy-forms: started
Running setup.py install for django-crispy-forms: finished with status 'done'
Running setup.py install for django-floppyforms: started
Running setup.py install for django-floppyforms: finished with status 'done'
Running setup.py install for django-model-utils: started
Running setup.py install for django-model-utils: finished with status 'done'
Running setup.py install for defusedxml: started
Running setup.py install for defusedxml: finished with status 'done'
Running setup.py install for python3-openid: started
Running setup.py install for python3-openid: finished with status 'done'
Running setup.py install for oauthlib: started
Running setup.py install for oauthlib: finished with status 'done'
Running setup.py install for django-allauth: started
Running setup.py install for django-allauth: finished with status 'done'
Running setup.py install for psycopg2: started
Running setup.py install for psycopg2: finished with status 'done'
Running setup.py install for unidecode: started
Running setup.py install for unidecode: finished with status 'done'
Running setup.py install for unicode-slugify: started
Running setup.py install for unicode-slugify: finished with status 'done'
Running setup.py install for django-redis: started
Running setup.py install for django-redis: finished with status 'done'
Running setup.py install for django-admin-bootstrapped: started
Running setup.py install for django-admin-bootstrapped: finished with status 'done'
Running setup.py install for coverage: started
Running setup.py install for coverage: finished with status 'done'
Running setup.py install for django-coverage-plugin: started
Running setup.py install for django-coverage-plugin: finished with status 'done'
Running setup.py install for MarkupSafe: started
Running setup.py install for MarkupSafe: finished with status 'done'
Running setup.py install for django-test-plus: started
Running setup.py install for django-test-plus: finished with status 'done'
Running setup.py install for sqlparse: started
Running setup.py install for sqlparse: finished with status 'done'
Running setup.py install for simplegeneric: started
Running setup.py install for simplegeneric: finished with status 'done'
Running setup.py install for ipdb: started
Running setup.py install for ipdb: finished with status 'done'
Running setup.py install for termcolor: started
Running setup.py install for termcolor: finished with status 'done'
Running setup.py install for pytest-sugar: started
Running setup.py install for pytest-sugar: finished with status 'done'
Successfully installed Jinja2-2.8 MarkupSafe-0.23 Pillow-3.3.0 Pygments-2.1.3 Sphinx-1.4.4 Werkzeug-0.11.10 alabaster-0.7.8 babel-2.3.4 coverage-4.1 decorator-4.0.10 defusedxml-0.4.1 django-1.9.7 django-admin-bootstrapped-2.5.7 django-allauth-0.25.2 django-autoslug-1.9.3 django-braces-1.9.0 django-coverage-plugin-1.3.1 django-crispy-forms-1.6.0 django-debug-toolbar-1.4 django-environ-0.4.0 django-extensions-1.6.7 django-floppyforms-1.6.2 django-model-utils-2.5 django-redis-4.4.3 django-test-plus-1.0.14 docutils-0.12 factory-boy-2.7.0 fake-factory-0.5.9 imagesize-0.7.1 ipdb-0.10.1 ipython-5.0.0 ipython-genutils-0.1.0 oauthlib-1.1.2 pexpect-4.2.0 pickleshare-0.7.2 prompt-toolkit-1.0.3 psycopg2-2.6.2 ptyprocess-0.5.1 py-1.4.31 pytest-2.9.2 pytest-django-2.9.1 pytest-sugar-0.7.1 python-dateutil-2.5.3 python3-openid-3.0.10 pytz-2016.4 redis-2.10.5 requests-2.10.0 requests-oauthlib-0.6.1 simplegeneric-0.8.1 six-1.10.0 snowballstemmer-1.2.1 sqlparse-0.1.19 termcolor-1.1.0 traitlets-4.2.2 unicode-slugify-0.1.3 unidecode-0.4.19 wcwidth-0.1.7 wheel-0.29.0
---> 619785f9cafb
Removing intermediate container 75445ffa29e0
Step 5 : COPY ./compose/django/entrypoint.sh /entrypoint.sh
---> c3bf84c88ee8
Removing intermediate container 87963ff6b60c
Step 6 : RUN sed -i 's/\r//' /entrypoint.sh
---> Running in 12a018d70328
---> 7b60c66deff7
Removing intermediate container 12a018d70328
Step 7 : RUN chmod +x /entrypoint.sh
---> Running in 6b57f153cde3
---> a82ca37f275c
Removing intermediate container 6b57f153cde3
Step 8 : WORKDIR /app
---> Running in 036ba3f70df1
---> 0078329f0874
Removing intermediate container 036ba3f70df1
Step 9 : ENTRYPOINT /entrypoint.sh
---> Running in 99b17af9031d
---> 3d7a999f3436
Removing intermediate container 99b17af9031d
Successfully built 3d7a999f3436
Building pycharm
Step 1 : FROM python:3.5
---> 7fd24fb1b492
Step 2 : ENV PYTHONUNBUFFERED 1
---> Using cache
---> 78e28bdf617f
Step 3 : COPY ./requirements /requirements
---> Using cache
---> 27e5784b3d1b
Step 4 : RUN pip install -r /requirements/local.txt
---> Using cache
---> 619785f9cafb
Step 5 : COPY ./compose/django/entrypoint.sh /entrypoint.sh
---> Using cache
---> c3bf84c88ee8
Step 6 : RUN sed -i 's/\r//' /entrypoint.sh
---> Using cache
---> 7b60c66deff7
Step 7 : RUN chmod +x /entrypoint.sh
---> Using cache
---> a82ca37f275c
Step 8 : WORKDIR /app
---> Using cache
---> 0078329f0874
Step 9 : ENTRYPOINT /entrypoint.sh
---> Using cache
---> 3d7a999f3436
Successfully built 3d7a999f3436
In Pycharm settings Project/Project Interpreter I have 2 remoter interpreters, Django and Pycharm (As per the installation instructions).
They both have django-admin-bootstrapped in the packages.
Now when I restart the server I get the error
ImportError: No module named 'django-admin-bootstrapped'
Just to be sure I installed django-admin bootstrapped both inside the virtualenvwrapper and in the global python site-packages.
What can I do here to get this up and running?
Thanks in advance

And suddenly it hit me:
In Django settings I had to put django_admin_bootstrapped instead of django-admin-bootstrapped
Once I changed that it worked like a charm.

Related

How do I fix "dyld: Library not loaded" when using "wget" on a command line for the Mac?

I'm using Mac OS Big Sur (v 11.4). Wehn I try and use "wget" on the command line I get this
$ wget http://localhost:8000/user/testuser
dyld: Library not loaded: /usr/local/opt/nettle/lib/libnettle.6.dylib
Referenced from: /usr/local/bin/wget
Reason: image not found
Abort trap: 6
Even after running "brew install wget" and restarting my machine, I get the above error. How do I get "wget" to run normally? This is the path where wget is installed ...
$ which wget
/usr/local/bin/wget
Edit: In response to the answer given, here is the output ...
$ brew install homebrew/core/wget
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 6 taps (phinze/cask, homebrew/core, homebrew/cask, homebrew/services, pivotal/tap and ethereum/ethereum).
==> New Formulae
airspyhf cargo-llvm-lines cilium-cli f2 h2c
basis_universal cargo-outdated datree fst vite
bubblewrap chrpath esbuild go#1.16 vue-cli
==> Updated Formulae
Updated 883 formulae.
==> Deleted Formulae
procyon-decompiler
==> New Casks
infra infra mimestream mimestream sigmaos sigmaos
==> Updated Casks
Updated 292 casks.
==> Deleted Casks
agfeo-dashboard macintosh-explorer
agfeo-dashboard macintosh-explorer
axe-electrum modulair
axe-electrum modulair
boonzi noraswitch
boonzi noraswitch
colormunki-photo obyte
colormunki-photo obyte
dnagedcom playnow
dnagedcom playnow
dragthing plecs-standalone
dragthing plecs-standalone
eaccess privatus
eaccess privatus
elpki pro-fit
elpki pro-fit
finisher-fluxx qtum
finisher-fluxx qtum
finisher-micro qyooo
finisher-micro qyooo
finisher-neo s3stat-setup
finisher-neo s3stat-setup
flow-e scrooo
flow-e scrooo
fluxcenter simplelink-msp432e4-sdk
fluxcenter simplelink-msp432e4-sdk
fm3-edit stageplotpro
fm3-edit stageplotpro
imarisviewer tbs-studio
imarisviewer tbs-studio
instant-articles-builder thetube
instant-articles-builder thetube
instasizer unity-appletv-support-for-editor
instasizer unity-appletv-support-for-editor
jabt-flow unity-linux-il2cpp-support-for-editor
jabt-flow unity-linux-il2cpp-support-for-editor
jidusm unity-macos-il2cpp-support-for-editor
jidusm unity-macos-il2cpp-support-for-editor
lightwright wanna
lightwright wanna
locklizard-safeguard-viewer zbuc-imgur
locklizard-safeguard-viewer zbuc-imgur
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/manifests/1.1.1l
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:ff8b2a965c680b4d9baccd60e799d0989e7dc
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:ff8b2a965c680b4d9baccd60e7
######################################################################## 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/wget/manifests/1.21.1_1
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/44061bb7a2f7bbbbbddd0901da6885f571bb53671d2ef9f3b29faa13cdc50ac7--wget-1.21.1_1.bottle_manifest.json
==> Downloading https://ghcr.io/v2/homebrew/core/wget/blobs/sha256:307217b813330eda365570d7540aa2da69c678b6c4b7
Already downloaded: /Users/davea/Library/Caches/Homebrew/downloads/2229e2908e6815b9ceac4ac5af316c49215750a1c6d0bdc10b3946b273ee648d--wget--1.21.1_1.big_sur.bottle.tar.gz
==> Installing dependencies for wget: openssl#1.1
==> Installing wget dependency: openssl#1.1
==> Pouring openssl#1.1--1.1.1l.big_sur.bottle.tar.gz
Error: Directory not empty # dir_s_rmdir - /usr/local/opt/openssl
That's interesting. wget from homebrew-core, the default package repo for Homebrew, doesn't depend on nettle at all.
Where did your get wget installed from? Uninstall wget and reinstall it back from the default pkg repo.
brew uninstall -f wget
# tell brew to get wget from homebrew-core explicitly
brew install homebrew/core/wget
Don't know if you managed to fix this, but I had a similar issue, found fix here: https://github.com/Homebrew/discussions/discussions/3920
brew reinstall z3

ruamel.yaml w/out C compiler on ARM

I am trying to install ruamel.yaml on a raspberry Pi system without a C compiler and encounter a build error installing ruamel.yaml.clib (pasted below).
I see this was previously addressed for ruamel.yaml>=0.15.41, <0.16.0 (How to install ruamel.yaml w/o native extension).
Note in the output below that the path from buildroot is not valid on the device running pip install but is from the device that built the image.
$ pip install ruamel.yaml~=0.16
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting ruamel.yaml~=0.16
Using cached ruamel.yaml-0.17.10-py3-none-any.whl (108 kB)
Collecting ruamel.yaml.clib>=0.1.2; platform_python_implementation == "CPython" and python_version < "3.10"
Using cached ruamel.yaml.clib-0.2.6.tar.gz (180 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-zdtfb19x
cwd: /tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/
Complete output (3 lines):
sys.argv ['/tmp/pip-install-2t0ptfu4/ruamel-yaml-clib/setup.py', 'egg_info', '--egg-base', '/tmp/pip-pip-egg-info-zdtfb19x']
test compiling /tmp/tmp_ruamel_5les1064/test_ruamel_yaml.c -> test_ruamel_yaml compile error: /tmp/tmp_ruamel_5les1064/test_ruamel_yaml.c
Exception: command '{path from buildroot}/aarch64-buildroot-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
A preferred solution would be to have a ruamel.yaml.clib wheel for ARM architectures or to make clib dependency optional (pip install ruamel.yaml[clib])
I'm not sure why this broke after 0.16, but I'll try to have a look as to why this fails again (it might be that setuptools now throws a different Exception that is not caught).
Wheels for ruamel.yaml.clib in aarch64 architecture are availalbe on piwheels.
You should be able to install those after adding:
[global]
extra-index-url=https://www.piwheels.org/simple
to /etc/pip.conf.
Disclaimer: I have no control over how wheels on piwheels are generated.

Error installing AutoitLibrary through command line

I need to install robotframework-autoitlibrary to use on my test cases.
My problem is when I try to install AutoIt Library through command line with the following command:
pip install -U robotframework-autoitlibrary --no-cache-dir --pre
I have this error:
C:\windows\system32>pip install -U robotframework-autoitlibrary --no-cache-
dir --pre
Collecting robotframework-autoitlibrary
Downloading
https://files.pythonhosted.org/packages/4e/a4/9e51fe35b1da7a006b773c9c234f78e89bcc4f267152c4e9fa8260631fa8/robotframework-autoitlibrary-1.2.2.zip (701kB)
100% |################################| 706kB 1.6MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\user-a~1\appdata\local\temp\pip-install-
oro1ov\robotframework-autoitlibrary\setup.py", line 93, in <module>
destPath = os.path.normpath(os.path.join(os.getenv("HOMEDRIVE"),
r"\RobotFramework\Extensions\AutoItLibrary"))
File "c:\python27\lib\ntpath.py", line 65, in join
result_drive, result_path = splitdrive(path)
File "c:\python27\lib\ntpath.py", line 115, in splitdrive
if len(p) > 1:
TypeError: object of type 'NoneType' has no len()
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in
c:\users\user-a~1\appdata\local\temp\pip-install-oro1ov\robotframework-
autoitlibrary\
My currently installed python packages and their versions are:
Pillow==5.3.0
Pygments==2.3.1
pypiwin32==223
Pypubsub==4.0.0
pywin32==224
robotframework==3.1
robotframework-ride==1.5.2.1
robotframework-selenium2library==3.0.0
robotframework-seleniumlibrary==3.3.0
selenium==3.141.0
six==1.12.0
typing==3.6.6
urllib3==1.24.1
wxPython==4.0.3
I already try this command:
pip install --upgrade setuptools
When input echo %HOMEDRIVE%, the output is:
C:\Users\cmpeixoto>echo %HOMEDRIVE%
C:
Thanks for your help,
The error looks like the environment variable HOMEDRIVE is not set, even though it has a value according to your test (the library installer uses it to copy some files).
Can you try this - manually set it, and straight after that run the pip - in the same Command Prompt (cmd) session:
set HOMEDRIVE=C:
pip install -U robotframework-autoitlibrary --no-cache-dir --pre

Installing awscli without internet

I am trying to install awscli on a RHEL machine.
Python 2.7.5 is installed, the machine does not have internet access.
I have installed setuptools 38.5.2 and setuptools_scm 1.15.7 from sources successfully.
Here is the command I have tried to run when installing:
sudo /usr/bin/python2.7 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws sudo awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Both are exiting with the following issue:
Running cmd: /usr/bin/python virtualenv.py --no-download --python /usr/bin/python /usr/local/aws
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///home/talendmaster/QlikSensePOC/awscli-bundle/packages awscli-1.14.54.tar.gz
Traceback (most recent call last):
File "awscli-bundle/install", line 143, in <module>
main()
File "awscli-bundle/install", line 132, in main
pip_install_packages(opts.install_dir)
File "awscli-bundle/install", line 100, in pip_install_packages
pip_script, PACKAGES_DIR, cli_tarball))
File "awscli-bundle/install", line 45, in run
p.returncode, cmd, stdout + stderr))
__main__.BadRCError: Bad rc (1) for cmd '/usr/local/aws/bin/pip install --no-index --find-links file:///home/talendmaster/QlikSensePOC/awscli-bundle/packages awscli-1.14.54.tar.gz': Processing ./awscli-1.14.54.tar.gz
Collecting botocore==1.9.7 (from awscli==1.14.54)
Collecting colorama<=0.3.7,>=0.2.5 (from awscli==1.14.54)
Collecting docutils>=0.10 (from awscli==1.14.54)
Collecting rsa<=3.5.0,>=3.1.2 (from awscli==1.14.54)
Collecting s3transfer<0.2.0,>=0.1.12 (from awscli==1.14.54)
Collecting PyYAML<=3.12,>=3.10 (from awscli==1.14.54)
Collecting jmespath<1.0.0,>=0.7.1 (from botocore==1.9.7->awscli==1.14.54)
Collecting python-dateutil<3.0.0,>=2.1 (from botocore==1.9.7->awscli==1.14.54)
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/setuptools_scm/: [Errno 101] Network is unreachable -- Some packages may not be found!
Download error on https://pypi.python.org/simple/setuptools-scm/: [Errno 101] Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'setuptools_scm' (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 working download links found for setuptools_scm
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-kh_Hg9/python-dateutil/setup.py", line 67, in <module>
"test": Unsupported
File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "/usr/local/aws/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1134, in obtain
return installer(requirement)
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/usr/local/aws/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('setuptools_scm')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-kh_Hg9/python-dateutil/
It seems to be related to setuptools_scm but reinstallation did not change anything. The internet access shouldn't be a problem since I have successfully installed a local version of the package.
I have just finished installing AWS CLI tools on an old RHEL 5.10 machine, this works for me as on date.
$ curl -LO https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
$ unzip awscli-bundle.zip
$ ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
Running cmd: /root/aws/bin/python virtualenv.py --no-download --python /root/aws/bin/python /usr/local/aws
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///root/awscli-bundle/packages/setup setuptools_scm-1.15.7.tar.gz
Running cmd: /usr/local/aws/bin/pip install --no-index --find-links file:///root/awscli-bundle/packages awscli-1.15.68.tar.gz
You can now run: /usr/local/bin/aws --version
$ aws --version
aws-cli/1.15.68 Python/2.6.8 Linux/2.6.18-363.el5 botocore/1.10.67
References:
https://medium.com/#vikas027/aws-cli-tools-in-rhel-centos-5-cd4b9beeb096 (my post)
https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html#install-bundle-other

Raspbian dpkg error /var/lib/dpkg/triggers/File

I have just installed raspbian for my raspberry pi and I tried to install fswebcam with sudo apt-get install fswebcam and I get the error:
dpkg: error: syntax error in file triggers file `/var/lib/dpkg/triggers/File'
E: Sub-process /usr/bin/dpkg returned an error code (2)
I then thought about doing an update so did:
sudo apt-get update
sudo apt-get upgrade
This also produces the same error:
dpkg: error: syntax error in file triggers file `/var/lib/dpkg/triggers/File'
E: Sub-process /usr/bin/dpkg returned an error code (2)
The packages download but can not install.
Here is the cat of the file and it does seem wrong:
/usr/sharm/Ijbo0knsvadm-infO
▒e;{▒my
#▒q▒}db+/}sR+sh!reman man-db/uw▒>l▒caMom`O▒m!f)Er
/u3z/locax+#rcre/ma~--d▒
'6sZ/▒%▒Z6/maN ▒sn%ef▒e▒d/mqn`eaN-▒2
-T{3/,HbNarL-m(j▒Y▒gn?dabihF/▒yn/▒o▒u▒7s li▒g▒+b`.p%0;a▒m`f
)▒ks/lib/miG*mk▒En▒c lyb'dib2.-▒*armhf
/As▒5rx▒2E/▒xib-0.8.3c▒▒e"! ,cbomib2n0=zirmh/muk/Scil0ag/d%cAs▒o}sp%d#g/mime/packages miLe)cwrxfst
-u{s▒!▒kJ%/mho▒'qackawe;(S▒a▒'d▒m+/e-info
.5▒rlibog$j▒▒92bufm2.▒?:-1 ▒l▒qders libedc,pixbu&2.-2▒BiHf▒u▒b/diB)Az▒=nifT8▒wOuea▒ih$-gmj▒u▒.#}▒"▒`'2.10.0/loadgR{▒|i"gdN-#j▒▒▒f2.0-0>abolf-usr/s▒ar'/▒o▒6sb▒/n6Bonf+gusr-s``ve?ehosdw▒h{:5'fkod▒ g▒▒4!nO▒ig
/ts▒?{(I▒e->mYIf▒v▒nT1▒f4K▒nf+g
/usr/mi▒o▒rLoliNu▒=▒~u%abHHdlj▒:.0&▒▒ .0m▒mmduleS0▒9kg▒k:.)0:armh/}rr.l▒b/gtk-2.1/▒.10/p▒yL-gdules`liCgtk2.0d0▒D▒-(,+/ts▒'sHe2e-Bxymicatmozs0ndsktop-film,W▒a▒c
/usb/3``r▒/gcknv-defa}~D?▒o▒=▒f2X/5krH3▒u/▒c/,▒▒#~d!|opy(&Cg▒V4
/pSf-shaRe▒wcgnF+skhUi!{ gco~▒s▒5{r>u(a3e/Qo0pl▒r ;p▒f
/u3r.L▒▒prm-diFqX)gnuepb▒`f/gti-;o0/▒.l▒?iLmkve&Ls|▒0gTk▒#-0:qr-`f
w/0▒3~2./im▒od7|e,▒i`guk▒3-`*!Ex▒▒msr/sjarD▒unu!mandJ▒urR/▒yB/▒unu menu
/etc▒ee▒q-/eDH▒▒c }e.=
/Tsr/sha▒e/kcoos▒x▒color xi"▒▒o0-icon-theiesR▒y▒▒uoxc▒f3'gNo▒u onNme-i#on
▒▒e/'
I would prefer not having to re-install raspbian but I will if I must
Thanks
In the end I unfortunately had to format the sd card and reinstall raspbian. The output of the file is a lot more comprehensive now. I will put the contents at a later date.