skip to Main Content

I was installing apache-airflow in my centOS 8. Only pip3 works in my environment. I did something with the environment variable which created two config files for airflow. I am not able to find another config file to delete it. So, I was trying to uninstall airflow. I used

pip3 uninstall apache-airflow

It removed the package but still, the other dependent files that were installed are there. I googled and found pip-autoremove but it doesn’t work for pip3.

I am trying to find a way to clean install airflow again by removing all the old files, dependent packages. Is there a way to use autoremove in pip3 or are there any other alternatives for my issue?

2

Answers


  1. Maybe if you make a new Virtual Environment and then install your package inside it.

    python3 -m venv /path/to/new/virtual/environment
    source <venv>/bin/activate.csh
    pip3 install apache-airflow
    pip3 freeze > dependencies.txt
    

    Then make a pip freeze and now you can delete all installed packages (which are apache-airflow and its dependencies) in you working environment. So you can go to your working environment and just delete them:

    pip3 uninstall -r <path>/dependencies.txt
    
    Login or Signup to reply.
  2. Delete all the files under $AIRFLOW_HOME (default path: ~/airflow). Airflow will look for config file at $AIRFLOW_HOME/airflow.cfg. So reinstall airflow, set $AIRFLOW_HOME to the place where you want to have all your config files and DAGs as mentioned in https://airflow.apache.org/start.html.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search