Airflow 2 import exception - installation

I uninstalled airflow 1.10.12 and installed airflow 2 using python 3.6.9. When I start the webserver without custom DAGs I get warnings:
[2021-01-12 11:38:58,095] {dagbag.py:440} INFO - Filling up the DagBag from /dev/null
[2021-01-12 11:38:59,049] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.cloud.hooks.dataprep.GoogleDataprepHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.cloud'
[2021-01-12 11:38:59,050] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.cloud'
[2021-01-12 11:38:59,050] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLDatabaseHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.cloud'
[2021-01-12 11:38:59,050] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.cloud.hooks.compute_ssh.ComputeEngineSSHHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.cloud'
[2021-01-12 11:38:59,050] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.cloud.hooks.bigquery.BigQueryHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.cloud'
[2021-01-12 11:38:59,051] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.common.hooks.base_google.GoogleBaseHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.common'
[2021-01-12 11:38:59,117] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.cloud.hooks.dataprep.GoogleDataprepHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.cloud'
[2021-01-12 11:38:59,117] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.cloud'
[2021-01-12 11:38:59,118] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.cloud.hooks.cloud_sql.CloudSQLDatabaseHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.cloud'
[2021-01-12 11:38:59,118] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.cloud.hooks.compute_ssh.ComputeEngineSSHHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.cloud'
[2021-01-12 11:38:59,118] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.cloud.hooks.bigquery.BigQueryHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.cloud'
[2021-01-12 11:38:59,118] {providers_manager.py:283} WARNING - Exception when importing 'airflow.providers.google.common.hooks.base_google.GoogleBaseHook' from 'apache-airflow-providers-google' package: No module named 'airflow.providers.google.common'
Can this be ignored or what could be the reason?
Regards
Oli

These are warnings for missing modules.
Airflow changed structure while 1.0>2.0
You can either ignore these, if not planning to use google cloud plugins, or install additional modules:
pip install --upgrade apache-airflow-providers-google
After installing above you would probably need more modules like mysql, paramiko and ssh.
You can install them with:
pip install --upgrade paramiko
pip install --upgrade apache-airflow-providers-ssh
pip install --upgrade apache-airflow-providers-mysql

Related

Pip install fails to find the build-system.requires package

I have a docker image with poetry-core installed and inside the container I tried to run a pip install of project and it failed with the package not found error
r
oot#test-86978fffbb-6rx79:/home# /usr/local/bin/python3 -m pip show poetry-core
Name: poetry-core
Version: 1.0.8
Summary: Poetry PEP 517 Build Backend
Home-page: https://github.com/python-poetry/poetry-core
Author: Sébastien Eustace
Author-email: sebastien#eustace.io
License: MIT
Location: /usr/local/lib/python3.9/site-packages
Requires:
Required-by:
My pyproject.toml
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
When I run pip install with internet disabled, it fails not able to find the poetry-core
root#test-86978fffbb-6rx79:/app# /usr/local/bin/python3 -m pip install /app/
Processing /app
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
? exit code: 1
??> [2 lines of output]
ERROR: Could not find a version that satisfies the requirement poetry-core>=1.0.0 (from versions: none)
ERROR: No matching distribution found for poetry-core>=1.0.0
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
? exit code: 1
??> See above for output.

Poetry - psycopg2 package installed yet no such file error

When installing a repo poetry build
and poetry install
run without problems. However running poetry run pytest -vvv
it results in this error about psycopg2 not being installed:
E ImportError: dlopen(/Users/xxxx/git_repos/xxx/.venv/lib/python3.10/site-packages/psycopg2/_psycopg.cpython-310-darwin.so, 0x0002): Library not loaded: #rpath/libssl.1.1.dylib
E Referenced from: /Users/xxx/git_repos/xxx/.venv/lib/python3.10/site-packages/psycopg2/_psycopg.cpython-310-darwin.so
E Reason: tried: '/opt/homebrew/lib/libssl.1.1.dylib' (no such file), '/opt/homebrew/lib/libssl.1.1.dylib' (no such file), '/usr/local/lib/libssl.1.1.dylib' (no such file), '/usr/lib/libssl.1.1.dylib' (no such file)
Moreover, running pip install psycopg2 says the package is already installed:
pip install psycopg2
Requirement already satisfied: psycopg2 in ./.venv/lib/python3.10/site-packages (2.9.3)```

Transaction check error when installing oracle on Centos OS

I am trying to install oracle with the following command on centos 7.5.
sudo yum install oracle-database-server-12cR2-preinstall -y
However, I am getting the following errors.
Transaction check error:
file /usr/lib/systemd/system-preset/90-default.preset from install of redhat-release-server-1:7.6-4.0.1.el7.x86_64 conflicts with file from package centos-release-7-5.1804.4.el7.centos.x86_64
file /etc/os-release from install of oraclelinux-release-7:7.6-1.0.15.el7.x86_64 conflicts with file from package centos-release-7-5.1804.4.el7.centos.x86_64
file /etc/redhat-release from install of oraclelinux-release-7:7.6-1.0.15.el7.x86_64 conflicts with file from package centos-release-7-5.1804.4.el7.centos.x86_64
file /etc/rpm/macros.dist from install of oraclelinux-release-7:7.6-1.0.15.el7.x86_64 conflicts with file from package centos-release-7-5.1804.4.el7.centos.x86_64
file /etc/system-release from install of oraclelinux-release-7:7.6-1.0.15.el7.x86_64 conflicts with file from package centos-release-7-5.1804.4.el7.centos.x86_64
file /etc/system-release-cpe from install of oraclelinux-release-7:7.6-1.0.15.el7.x86_64 conflicts with file from package centos-release-7-5.1804.4.el7.centos.x86_64
Error Summary
-------------
Could anybody help me?
Thanks
Shuja

Error in Puppet agent 3.8 installation on cent OS 7.5 without internet

I am installing puppet agent 3.8.7 on cent OS 7.5. The OS was installed on a new VM and it is not connected to internet. I have created a yum repo which points to pulp repository. Below are the contents of my yum repo for puppet -
[root#server --- ~]# cat /etc/yum.repos.d/puppetlabs.repo
[puppetlabs-products]
name=Puppet Labs Products El 7 - $basearch
baseurl=http://136.243.83.142/pulp/repos/puppetlabs-products-el6
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet
enabled=1
gpgcheck=1
[puppetlabs-deps]
name=Puppet Labs Dependencies El 7 - $basearch
baseurl=http://136.243.83.142/pulp/repos/puppetlabs-deps-el6/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppetlabs
file:///etc/pki/rpm-gpg/RPM-GPG-KEY-puppet
enabled=1
gpgcheck=1
when I run 'yum install puppet', I get below error. I have ruby 2.0 installed but the puppet packages reuquire ruby 1.8. When I checked the puppetlabs site, they mention puppet supports ruby 2.0. So, how do I proceed now, given the fact that my server is in internal domain and not connected to internet.
Below is the error I get on executing 'yum install puppet' -
[root#server --- ~]# yum install puppet
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
epel | 2.5 kB 00:00:00
puppetlabs-deps | 1.8 kB 00:00:00
puppetlabs-products | 1.8 kB 00:00:00
Resolving Dependencies
--> Running transaction check
---> Package puppet.noarch 0:3.8.7-1.el6 will be installed
--> Processing Dependency: hiera >= 1.0.0 for package: puppet-3.8.7-1.el6.noarch
--> Processing Dependency: facter >= 1:1.7.0 for package: puppet-3.8.7-1.el6.noarch
--> Processing Dependency: ruby(selinux) for package: puppet-3.8.7-1.el6.noarch
--> Processing Dependency: ruby-augeas for package: puppet-3.8.7-1.el6.noarch
--> Processing Dependency: ruby-shadow for package: puppet-3.8.7-1.el6.noarch
--> Running transaction check
---> Package facter.x86_64 1:2.4.6-1.el6 will be installed
---> Package hiera.noarch 0:1.3.4-1.el6 will be installed
---> Package puppet.noarch 0:3.8.7-1.el6 will be installed
--> Processing Dependency: ruby(selinux) for package: puppet-3.8.7-1.el6.noarch
---> Package ruby-augeas.x86_64 0:0.4.1-3.el6 will be installed
--> Processing Dependency: ruby(abi) = 1.8 for package: ruby-augeas-0.4.1-3.el6.x86_64
--> Processing Dependency: libruby.so.1.8()(64bit) for package: ruby-augeas-0.4.1-3.el6.x86_64
---> Package ruby-shadow.x86_64 1:2.2.0-2.el6 will be installed
--> Processing Dependency: libruby.so.1.8()(64bit) for package: 1:ruby-shadow-2.2.0-2.el6.x86_64
--> Finished Dependency Resolution
Error: Package: puppet-3.8.7-1.el6.noarch (puppetlabs-products)
Requires: ruby(selinux)
Error: Package: ruby-augeas-0.4.1-3.el6.x86_64 (puppetlabs-deps)
Requires: libruby.so.1.8()(64bit)
Error: Package: 1:ruby-shadow-2.2.0-2.el6.x86_64 (puppetlabs-deps)
Requires: libruby.so.1.8()(64bit)
Error: Package: ruby-augeas-0.4.1-3.el6.x86_64 (puppetlabs-deps)
Requires: ruby(abi) = 1.8
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

How to install Apache2 on linux

I tried more option to install Apache2 on my Ubuntu os but i got error like
dpkg: error processing package php5-mysql (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of phpmyadmin:
phpmyadmin depends on php5-mysql | php5-mysqli | php5-mysqlnd; however:
Package php5-mysql is not configured yet.
Package php5-mysqli is not installed.
Package php5-mysqlnd is not installed.
dpkg: error processing package phpmyadmin (--configure):
dependency problems - leaving unconfigured
Setting up apache2 (2.4.7-1ubuntu4.5) ...No apport report written because the error message indicates its a followup error from a previous failure.
Enabling module mpm_event.
Enabling module authz_core.
Enabling module authz_host.
Enabling module authn_core.
Enabling module auth_basic.
Enabling module access_compat.
Enabling module authn_file.
Enabling module authz_user.
Enabling module alias.
Enabling module dir.
Enabling module autoindex.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module filter.
Enabling module deflate.
Enabling module status.
Enabling conf charset.
Enabling conf localized-error-pages.
Enabling conf other-vhosts-access-log.
Enabling conf security.
Enabling conf serve-cgi-bin.
Enabling site 000-default.
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Errors were encountered while processing:
php5-mysql
phpmyadmin
E: Sub-process /usr/bin/dpkg returned an error code (1)
and sometime i got error E: Unable to locate package libmysqlclient15off
in linux terminal do
install apache2
sudo apt-get update
sudo apt-get install apache2
install mysql
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
hope this helps sir

Resources