Could not install packages due to an EnvironmentError [Error 13] Permission denied:

// error message when installing a pip package
ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: 'C:\\Python38\\Lib\\site-packages\\__pycache__\\pycodestyle.cpython-38.pyc'
Consider using the `--user` option or check the permissions.

// just add --user to the command. ex:
python -m pip install autopep8 --user --trusted-host files.pythonhosted.org --trusted-host pypi.org

Enable CORS in .NET Core Web API

// Startup.cs

public void ConfigureServices(IServiceCollection services)
{
    services.AddCors(options =>
    {
        options
            .AddPolicy("CorsPolicy", builder => builder
            .WithOrigins("http://localhost:4200")
            .AllowAnyMethod()
            .AllowAnyHeader()
            .AllowCredentials());
        });
    }
}

public void Configure(IApplicationBuilder app, IApiVersionDescriptionProvider provider)
{
    app.UseCors("CorsPolicy");
}

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by ‘SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)’),)’: /simple/pylint/ >>>>>>>> Could not fetch URL https://pypi.python.org/simple/setuptools/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host=’pypi.python.org’, port=443): Max retries exceeded with url: /simple/setuptools/ (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)’),)) – skipping



// add the following flag to the pip command:

--trusted-host files.pythonhosted.org --trusted-host pypi.org

// or wherever the error indicates a problem in

<error message>... HTTPSConnectionPool(host='pypi.python.org', port=443)

Fix “is not digitally signed” powershell error

#Open powershell as administrator
Get-ExecutionPolicy -List
         Scope               ExecutionPolicy
         -----               ---------------
 MachinePolicy               Undefined
    UserPolicy               Undefined
       Process               Unrestricted
   CurrentUser               Unrestricted
  LocalMachine               Unrestricted

#Set all to Unrestricted where allowed. The first two are usually managed by group policy.

Set-ExecutionPolicy Unrestricted -Scope Process
#type Y and press enter