Python Error: No module named azure.mgmt.compute.v2018_04_01.models._models

This is probably because you don't have package azure_mgmt_computeazure_mgmt_signalrazure_mgmt_reservationsazure_eventgridazure_mgmt_hdinsightazure_cli_privatednsazure_cosmosdb_tableazure_mgmt_loganalyticsazure_mgmt_sqlvirtualmachineazure_mgmt_containerinstanceazure_mgmt_authorizationazure_mgmt_appconfigurationazure_servicefabricazure_mgmt_mapsazure_cli_command_modules_nspkgazure_mgmt_securityazure_mgmt_devspacesazure_loganalyticsazure_mgmt_monitorazure_mgmt_redisazure_mgmt_servicebusazure_mgmt_cdnazure_mgmt_iothubazure_mgmt_mediaazure_mgmt_dnsazure_mgmt_apimanagementazure_cliazure_cosmosdb_nspkgazure_mgmt_imagebuilderazure_cli_billingazure_cosmosazure_mgmt_policyinsightsazure_mgmt_botserviceazure_mgmt_datamigrationazure_mgmt_cognitiveservicesazure_mgmt_cosmosdbazure_cli_roleazure_mgmt_iotcentralazure_cli_cdnazure_mgmt_managementpartnerazure_mgmt_webazure_mgmt_relayazure_cli_servicebusazure_cli_backupazure_mgmt_servicefabricazure_mgmt_subscriptionazure_mgmt_commerceazure_mgmt_devtestlabsazure_mgmt_billingazure_mgmt_containerserviceazure_mgmt_eventhubazure_mgmt_managementgroupsazure_mgmt_containerregistryazure_mgmt_marketplaceorderingazure_mgmt_sqlazure_servicemanagement_legacyazure_cli_storageazure_mgmt_logicazure_cli_batchazure_mgmt_recoveryservicesbackupazure_mgmt_privatednsazure_mgmt_storageazure_mgmt_trafficmanagerazure_cli_profileazure_mgmt_kustoazure_mgmt_deploymentmanagerazure_datalake_storeazure_mgmt_batchazure_multiapi_storageazure_mgmt_iothubprovisioningservicesazure_cli_vmazure_graphrbacazure_mgmt_networkazure_mgmt_keyvaultazure_mgmt_netappazure_mgmt_eventgridazure_mgmt_datalake_analyticsazure_mgmt_batchaiazure_batchazure_mgmt_consumptionazure_cli_networkazure_mgmt_managedservicesazure_cli_servicefabricazure_servicebusazure_cli_reservationsazure_mgmt_advisor or azure_mgmt_applicationinsights installed.

You can install it in command line via pip:

        pip install azure_mgmt_compute
# or
pip install azure_mgmt_signalr
# or
pip install azure_mgmt_reservations
# or
pip install azure_eventgrid
# or
pip install azure_mgmt_hdinsight
# or
pip install azure_cli_privatedns
# or
pip install azure_cosmosdb_table
# or
pip install azure_mgmt_loganalytics
# or
pip install azure_mgmt_sqlvirtualmachine
# or
pip install azure_mgmt_containerinstance
# or
pip install azure_mgmt_authorization
# or
pip install azure_mgmt_appconfiguration
# or
pip install azure_servicefabric
# or
pip install azure_mgmt_maps
# or
pip install azure_cli_command_modules_nspkg
# or
pip install azure_mgmt_security
# or
pip install azure_mgmt_devspaces
# or
pip install azure_loganalytics
# or
pip install azure_mgmt_monitor
# or
pip install azure_mgmt_redis
# or
pip install azure_mgmt_servicebus
# or
pip install azure_mgmt_cdn
# or
pip install azure_mgmt_iothub
# or
pip install azure_mgmt_media
# or
pip install azure_mgmt_dns
# or
pip install azure_mgmt_apimanagement
# or
pip install azure_cli
# or
pip install azure_cosmosdb_nspkg
# or
pip install azure_mgmt_imagebuilder
# or
pip install azure_cli_billing
# or
pip install azure_cosmos
# or
pip install azure_mgmt_policyinsights
# or
pip install azure_mgmt_botservice
# or
pip install azure_mgmt_datamigration
# or
pip install azure_mgmt_cognitiveservices
# or
pip install azure_mgmt_cosmosdb
# or
pip install azure_cli_role
# or
pip install azure_mgmt_iotcentral
# or
pip install azure_cli_cdn
# or
pip install azure_mgmt_managementpartner
# or
pip install azure_mgmt_web
# or
pip install azure_mgmt_relay
# or
pip install azure_cli_servicebus
# or
pip install azure_cli_backup
# or
pip install azure_mgmt_servicefabric
# or
pip install azure_mgmt_subscription
# or
pip install azure_mgmt_commerce
# or
pip install azure_mgmt_devtestlabs
# or
pip install azure_mgmt_billing
# or
pip install azure_mgmt_containerservice
# or
pip install azure_mgmt_eventhub
# or
pip install azure_mgmt_managementgroups
# or
pip install azure_mgmt_containerregistry
# or
pip install azure_mgmt_marketplaceordering
# or
pip install azure_mgmt_sql
# or
pip install azure_servicemanagement_legacy
# or
pip install azure_cli_storage
# or
pip install azure_mgmt_logic
# or
pip install azure_cli_batch
# or
pip install azure_mgmt_recoveryservicesbackup
# or
pip install azure_mgmt_privatedns
# or
pip install azure_mgmt_storage
# or
pip install azure_mgmt_trafficmanager
# or
pip install azure_cli_profile
# or
pip install azure_mgmt_kusto
# or
pip install azure_mgmt_deploymentmanager
# or
pip install azure_datalake_store
# or
pip install azure_mgmt_batch
# or
pip install azure_multiapi_storage
# or
pip install azure_mgmt_iothubprovisioningservices
# or
pip install azure_cli_vm
# or
pip install azure_graphrbac
# or
pip install azure_mgmt_network
# or
pip install azure_mgmt_keyvault
# or
pip install azure_mgmt_netapp
# or
pip install azure_mgmt_eventgrid
# or
pip install azure_mgmt_datalake_analytics
# or
pip install azure_mgmt_batchai
# or
pip install azure_batch
# or
pip install azure_mgmt_consumption
# or
pip install azure_cli_network
# or
pip install azure_mgmt_managedservices
# or
pip install azure_cli_servicefabric
# or
pip install azure_servicebus
# or
pip install azure_cli_reservations
# or
pip install azure_mgmt_advisor
# or
pip install azure_mgmt_applicationinsights
      

Install specific version:

        pip install "azure_mgmt_compute==10.0.0"
# or
pip install "azure_mgmt_signalr==0.3.0"
# or
pip install "azure_mgmt_reservations==0.6.0"
# or
pip install "azure_eventgrid==1.3.0"
# or
pip install "azure_mgmt_hdinsight==1.3.0"
# or
pip install "azure_cli_privatedns==1.0.2"
# or
pip install "azure_cosmosdb_table==1.0.6"
# or
pip install "azure_mgmt_loganalytics==0.2.0"
# or
pip install "azure_mgmt_sqlvirtualmachine==0.5.0"
# or
pip install "azure_mgmt_containerinstance==1.5.0"
# or
pip install "azure_mgmt_authorization==0.52.0"
# or
pip install "azure_mgmt_appconfiguration==0.4.0"
# or
pip install "azure_servicefabric==6.3.0.0"
# or
pip install "azure_mgmt_maps==0.1.0"
# or
pip install "azure_cli_command_modules_nspkg==2.0.3"
# or
pip install "azure_mgmt_security==0.1.0"
# or
pip install "azure_mgmt_devspaces==0.1.0"
# or
pip install "azure_loganalytics==0.1.0"
# or
pip install "azure_mgmt_monitor==0.7.0"
# or
pip install "azure_mgmt_redis==7.0.0rc1"
# or
pip install "azure_mgmt_servicebus==0.6.0"
# or
pip install "azure_mgmt_cdn==4.0.0"
# or
pip install "azure_mgmt_iothub==0.8.2"
# or
pip install "azure_mgmt_media==1.1.1"
# or
pip install "azure_mgmt_dns==2.1.0"
# or
pip install "azure_mgmt_apimanagement==0.1.0"
# or
pip install "azure_cli==2.1.0"
# or
pip install "azure_cosmosdb_nspkg==2.0.2"
# or
pip install "azure_mgmt_imagebuilder==0.2.1"
# or
pip install "azure_cli_billing==0.2.2"
# or
pip install "azure_cosmos==3.1.2"
# or
pip install "azure_mgmt_policyinsights==0.4.0"
# or
pip install "azure_mgmt_botservice==0.2.0"
# or
pip install "azure_mgmt_datamigration==0.1.0"
# or
pip install "azure_mgmt_cognitiveservices==5.0.0"
# or
pip install "azure_mgmt_cosmosdb==0.11.0"
# or
pip install "azure_cli_role==2.6.4"
# or
pip install "azure_mgmt_iotcentral==2.0.0"
# or
pip install "azure_cli_cdn==0.2.4"
# or
pip install "azure_mgmt_managementpartner==0.1.1"
# or
pip install "azure_mgmt_web==0.44.0"
# or
pip install "azure_mgmt_relay==0.1.0"
# or
pip install "azure_cli_servicebus==0.3.6"
# or
pip install "azure_cli_backup==1.2.5"
# or
pip install "azure_mgmt_servicefabric==0.4.0"
# or
pip install "azure_mgmt_subscription==0.2.0"
# or
pip install "azure_mgmt_commerce==1.0.1"
# or
pip install "azure_mgmt_devtestlabs==2.2.0"
# or
pip install "azure_mgmt_billing==0.2.0"
# or
pip install "azure_mgmt_containerservice==8.1.0"
# or
pip install "azure_mgmt_eventhub==3.0.0"
# or
pip install "azure_mgmt_managementgroups==0.2.0"
# or
pip install "azure_mgmt_containerregistry==3.0.0rc9"
# or
pip install "azure_mgmt_marketplaceordering==0.2.1"
# or
pip install "azure_mgmt_sql==0.15.0"
# or
pip install "azure_servicemanagement_legacy==0.20.6"
# or
pip install "azure_cli_storage==2.4.3"
# or
pip install "azure_mgmt_logic==3.0.0"
# or
pip install "azure_cli_batch==4.0.3"
# or
pip install "azure_mgmt_recoveryservicesbackup==0.6.0"
# or
pip install "azure_mgmt_privatedns==0.1.0"
# or
pip install "azure_mgmt_storage==7.2.0"
# or
pip install "azure_mgmt_trafficmanager==0.51.0"
# or
pip install "azure_cli_profile==2.1.5"
# or
pip install "azure_mgmt_kusto==0.3.0"
# or
pip install "azure_mgmt_deploymentmanager==0.2.0"
# or
pip install "azure_datalake_store==0.0.48"
# or
pip install "azure_mgmt_batch==7.0.0"
# or
pip install "azure_multiapi_storage==0.2.4"
# or
pip install "azure_mgmt_iothubprovisioningservices==0.2.0"
# or
pip install "azure_cli_vm==2.2.23"
# or
pip install "azure_graphrbac==0.40.0"
# or
pip install "azure_mgmt_network==9.0.0"
# or
pip install "azure_mgmt_keyvault==2.1.1"
# or
pip install "azure_mgmt_netapp==0.7.0"
# or
pip install "azure_mgmt_eventgrid==2.2.0"
# or
pip install "azure_mgmt_datalake_analytics==0.2.1"
# or
pip install "azure_mgmt_batchai==2.0.0"
# or
pip install "azure_batch==8.0.0"
# or
pip install "azure_mgmt_consumption==2.0.0"
# or
pip install "azure_cli_network==2.5.2"
# or
pip install "azure_mgmt_managedservices==1.0.0"
# or
pip install "azure_cli_servicefabric==0.1.20"
# or
pip install "azure_servicebus==0.21.1"
# or
pip install "azure_cli_reservations==0.4.3"
# or
pip install "azure_mgmt_advisor==2.0.1"
# or
pip install "azure_mgmt_applicationinsights==0.1.1"
      

Get more info about package via pypi.org: azure_mgmt_compute azure_mgmt_signalr azure_mgmt_reservations azure_eventgrid azure_mgmt_hdinsight azure_cli_privatedns azure_cosmosdb_table azure_mgmt_loganalytics azure_mgmt_sqlvirtualmachine azure_mgmt_containerinstance azure_mgmt_authorization azure_mgmt_appconfiguration azure_servicefabric azure_mgmt_maps azure_cli_command_modules_nspkg azure_mgmt_security azure_mgmt_devspaces azure_loganalytics azure_mgmt_monitor azure_mgmt_redis azure_mgmt_servicebus azure_mgmt_cdn azure_mgmt_iothub azure_mgmt_media azure_mgmt_dns azure_mgmt_apimanagement azure_cli azure_cosmosdb_nspkg azure_mgmt_imagebuilder azure_cli_billing azure_cosmos azure_mgmt_policyinsights azure_mgmt_botservice azure_mgmt_datamigration azure_mgmt_cognitiveservices azure_mgmt_cosmosdb azure_cli_role azure_mgmt_iotcentral azure_cli_cdn azure_mgmt_managementpartner azure_mgmt_web azure_mgmt_relay azure_cli_servicebus azure_cli_backup azure_mgmt_servicefabric azure_mgmt_subscription azure_mgmt_commerce azure_mgmt_devtestlabs azure_mgmt_billing azure_mgmt_containerservice azure_mgmt_eventhub azure_mgmt_managementgroups azure_mgmt_containerregistry azure_mgmt_marketplaceordering azure_mgmt_sql azure_servicemanagement_legacy azure_cli_storage azure_mgmt_logic azure_cli_batch azure_mgmt_recoveryservicesbackup azure_mgmt_privatedns azure_mgmt_storage azure_mgmt_trafficmanager azure_cli_profile azure_mgmt_kusto azure_mgmt_deploymentmanager azure_datalake_store azure_mgmt_batch azure_multiapi_storage azure_mgmt_iothubprovisioningservices azure_cli_vm azure_graphrbac azure_mgmt_network azure_mgmt_keyvault azure_mgmt_netapp azure_mgmt_eventgrid azure_mgmt_datalake_analytics azure_mgmt_batchai azure_batch azure_mgmt_consumption azure_cli_network azure_mgmt_managedservices azure_cli_servicefabric azure_servicebus azure_cli_reservations azure_mgmt_advisor azure_mgmt_applicationinsights