Run command “composer install” when activating wordpress plugin

I want to run the command : "composer install –prefer-dist" in a wordpress plugin in the hook register_activation_hook to install the require vendors. But when I trying to activating the plugin the error below is generate. Do you have a way to install the required composers when activate the plugin?

Fatal error: Uncaught Error: Class ‘App\XXXXX’ not found in /../wordpress/wp-content/plugins/my-plugin/my-plugin.php:54 Stack trace: #0 /../wordpress/wp-admin/includes/plugin.php(2300): include() #1 /../wordpress/wp-admin/plugins.php(191): plugin_sandbox_scrape(‘my-plugin/my-…’) #2 {main} thrown in /../wordpress/wp-content/plugins/my-plugin/my-plugin.php on line 54