问:
How do I get my Stripe payments to work on Angular and Node.js?
I am registered for Stripe, and I am working on an e-Commerce website. When I click "GO TO CHECKOUT" button, I get an error which says POST http://localhost:4200/create-checkout-session 404 (Not Found). I will send you a sample version of this project that I am working on, since my goal is only to get the button to work. I am not that experienced with Stripe, and need help from anyone who has been successful with Stripe payments through Angular. The documentation is here (https://docs.ngx-stripe.dev/), but I find it quite confusing due to my little experience with Stripe. The payments must NOT be Legacy Checkout.

The aim is to get the "GO TO CHECKOUT" button to eventually link to the Stripe payment page.

error image

The GitHub link is https://github.com/Aacgectyuoki/testing123, if you want to try the code yourself.

checkout.component.html

```<code><button (click)="checkout()">
    GO TO CHECKOUT
</button>
</code>```

checkout.component.ts

```<code>import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { switchMap } from 'rxjs/operators';

import { StripeService } from 'ngx-stripe';

@Component({
  selector: 'app-checkout',
  templateUrl: './checkout.component.html'
})
export class CheckoutComponent {
  constructor(
    private http: HttpClient,
    private stripeService: StripeService
  ) {}

  checkout() {
    // Check the server.js tab to see an example implementation
    this.http.post('/create-checkout-session', {})
      .pipe(
        switchMap(session => {
          //@ts-ignore
          return this.stripeService.redirectToCheckout({ sessionId: session.id })
        })
      )
      .subscribe(result => {
        // If `redirectToCheckout` fails due to a browser or network
        // error, you should display the localized error message to your
        // customer using `error.message`.
        if (result.error) {
          alert(result.error.message);
        }
      });
  }
}
</code>```

app.module.ts

```<code>import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { NgxStripeModule } from 'ngx-stripe';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CheckoutComponent } from './checkout/checkout.component';

@NgModule({
  declarations: [
    AppComponent,
    CheckoutComponent
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    NgxStripeModule.forRoot('INSERT PK HERE'),
    ReactiveFormsModule//,
   // LibraryModule
  ],
  providers: [],
  bootstrap: [AppComponent],
  schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
})
export class AppModule { }
</code>```

server.js

```<code>const express = require('express');
const app = express();
// @ts-ignore
const stripe = require('stripe')('INSERT SECRET KEY HERE');

app.post('/create-checkout-session', async (req, res) => {
  const session = await stripe.checkout.sessions.create({
    payment_method_types: ['card'],
    line_items: [
      {
        price_data: {
          currency: 'usd',
          product_data: {
            name: 'T-shirt',
          },
          unit_amount: 2000,
        },
        quantity: 1,
      },
    ],
    mode: 'payment',
    success_url: 'https://example.com/success',
    cancel_url: 'https://example.com/cancel',
  });

  res.json({ id: session.id });
});

app.listen(4242, () => console.log(`Listening on port ${4242}!`));
</code>```

答:
The reason why you're seeing that error message is because your application is making a request to a route that doesn't exist i.e. http://localhost:4200/create-checkout-session.

This line of code uses a relative URL - it will use the root domain of your page to make the request e.g. http://localhost:4200/create-checkout-session

```<code>this.http.post('/create-checkout-session', {})
</code>```

However, your server is configured to listen on port 4242. The simplest way to fix this would be to update the line to an absolute URL

```<code>this.http.post('http://localhost:4242/create-checkout-session', {})
</code>```

Although a better fix would be to configure and use a environment variable

```<code>this.http.post(SERVER_DOMAIN + '/create-checkout-session', {})
</code>```

After fixing that issue, if you try clicking on the button, you'll see the below error.

Since you're making a request from a different domain i.e. localhost:4200 -> localhost:4242, you will also need to enable/allow cross-origin requests on your server. You can refer to this : Javascript - Response to preflight request doesn't pass access control check

Body:
I am registered for Stripe, and I am working on an e-Commerce website. When I click "GO TO CHECKOUT" button, I get an error which says POST http://localhost:4200/create-checkout-session 404 (Not Found). I will send you a sample version of this project that I am working on, since my goal is only to get the button to work. I am not that experienced with Stripe, and need help from anyone who has been successful with Stripe payments through Angular. The documentation is here (https://docs.ngx-stripe.dev/), but I find it quite confusing due to my little experience with Stripe. The payments must NOT be Legacy Checkout.

The aim is to get the "GO TO CHECKOUT" button to eventually link to the Stripe payment page.

error image

The GitHub link is https://github.com/Aacgectyuoki/testing123, if you want to try the code yourself.

checkout.component.html

<button (click)="checkout()">
    GO TO CHECKOUT
</button>

checkout.component.ts

import { Component, OnInit } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { switchMap } from 'rxjs/operators';

import { StripeService } from 'ngx-stripe';

@Component({
  selector: 'app-checkout',
  templateUrl: './checkout.component.html'
})
export class CheckoutComponent {
  constructor(
    private http: HttpClient,
    private stripeService: StripeService
  ) {}

  checkout() {
    // Check the server.js tab to see an example implementation
    this.http.post('/create-checkout-session', {})
      .pipe(
        switchMap(session => {
          //@ts-ignore
          return this.stripeService.redirectToCheckout({ sessionId: session.id })
        })
      )
      .subscribe(result => {
        // If `redirectToCheckout` fails due to a browser or network
        // error, you should display the localized error message to your
        // customer using `error.message`.
        if (result.error) {
          alert(result.error.message);
        }
      });
  }
}

app.module.ts

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { HttpClientModule } from '@angular/common/http';
import { ReactiveFormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { NgxStripeModule } from 'ngx-stripe';
import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { CheckoutComponent } from './checkout/checkout.component';

@NgModule({
  declarations: [
    AppComponent,
    CheckoutComponent
  ],
  imports: [
    BrowserModule,
    HttpClientModule,
    NgxStripeModule.forRoot('INSERT PK HERE'),
    ReactiveFormsModule//,
   // LibraryModule
  ],
  providers: [],
  bootstrap: [AppComponent],
  schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
})
export class AppModule { }

server.js

const express = require('express');
const app = express();
// @ts-ignore
const stripe = require('stripe')('INSERT SECRET KEY HERE');

app.post('/create-checkout-session', async (req, res) => {
  const session = await stripe.checkout.sessions.create({
    payment_method_types: ['card'],
    line_items: [
      {
        price_data: {
          currency: 'usd',
          product_data: {
            name: 'T-shirt',
          },
          unit_amount: 2000,
        },
        quantity: 1,
      },
    ],
    mode: 'payment',
    success_url: 'https://example.com/success',
    cancel_url: 'https://example.com/cancel',
  });

  res.json({ id: session.id });
});

app.listen(4242, () => console.log(`Listening on port ${4242}!`));

Body:
The reason why you're seeing that error message is because your application is making a request to a route that doesn't exist i.e. http://localhost:4200/create-checkout-session.

This line of code uses a relative URL - it will use the root domain of your page to make the request e.g. http://localhost:4200/create-checkout-session

this.http.post('/create-checkout-session', {})

However, your server is configured to listen on port 4242. The simplest way to fix this would be to update the line to an absolute URL

this.http.post('http://localhost:4242/create-checkout-session', {})

Although a better fix would be to configure and use a environment variable

this.http.post(SERVER_DOMAIN + '/create-checkout-session', {})

After fixing that issue, if you try clicking on the button, you'll see the below error.

Since you're making a request from a different domain i.e. localhost:4200 -> localhost:4242, you will also need to enable/allow cross-origin requests on your server. You can refer to this : Javascript - Response to preflight request doesn't pass access control check


来源: stackexchange

问:
Cannot install numpy for PyPy 3.8 on Win10
I am attempting to try out pypy, and I can install a few packages, but the important ones like Numpy and Pandas go boom!!!  I get similar issues if I try it within PyCharm.

see below.  Also at some point I also saw this error.

```
     Optimized (vendor) Blas libraries are not found.
      Falls back to netlib Blas library which has worse performance.
      A better performance should be easily gained by switching
      Blas library.

  Blas (http://www.netlib.org/blas/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [blas]) or by setting
      the BLAS environment variable.
```

```
pypy -m pip install --extra-index-url https://antocuni.github.io/pypy-wheels/manylinux2010 numpy

```
C:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64>pypy -m pip install --extra-index-url https://antocuni.github.io/pypy-wheels/manylinux2010 numpy
Looking in indexes: https://pypi.org/simple, https://antocuni.github.io/pypy-wheels/manylinux2010
warning: missing-index-doctype

The package index page being used does not have a proper HTML doctype declaration.

Problematic URL: https://antocuni.github.io/pypy-wheels/manylinux2010/numpy/

note: This is an issue with the page at the URL mentioned above.
hint: You might need to reach out to the owner of that package index, to get this fixed. See https://github.com/pypa/pip/issues/10825 for context.
Collecting numpy
  Using cached numpy-1.22.2.zip (11.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: numpy
  Building wheel for numpy (pyproject.toml) ... error
  error: subprocess-exited-with-error

  Building wheel for numpy (pyproject.toml) did not run successfully.
  exit code: 1

  [690 lines of output]
  Processing numpy/random\_bounded_integers.pxd.in
...
  Processing numpy/random\_sfc64.pyx
  Cythonizing sources
  WARN: Could not locate executable g77
  WARN: Could not locate executable f77
  WARN: Could not locate executable ifort
  WARN: Could not locate executable ifl
  WARN: Could not locate executable f90
  WARN: Could not locate executable DF
  WARN: Could not locate executable efl
  WARN: Could not locate executable gfortran
  WARN: Could not locate executable f95
  WARN: Could not locate executable g95
  WARN: Could not locate executable efort
  WARN: Could not locate executable efc
  WARN: Could not locate executable flang
  WARN: don't know how to compile Fortran code on platform 'nt'
  non-existing path in 'numpy\\distutils': 'site.cfg'
  running bdist_wheel
  running build
...
  creating build\src.win-amd64-3.8\numpy\core\src\multiarray
  BUILD_ARCHITECTURE: 'AMD64', os.name='nt', sys.platform='win32'
  non-existing path in 'numpy\\core': 'build\\src.win-amd64-3.8\\numpy\\core\\src\\common'
  creating build\src.win-amd64-3.8\numpy\core\src\common
...
  creating build\src.win-amd64-3.8\numpy\linalg
  ### Warning:  Using unoptimized lapack ###
  ### Warning:  Using unoptimized lapack ###
  running build_py
...
  creating C:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks
  WARN: CCompilerOpt.__init__[1169] : feature 'AVX512_KNL' is disabled, MSVC compiler doesn't support it
  WARN: CCompilerOpt.__init__[1169] : feature 'AVX512_KNM' is disabled, MSVC compiler doesn't support it
  WARN: CCompilerOpt.dist_test[590] : CCompilerOpt._dist_test_spawn[714] : Flags in command (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /TcC:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\test_flags.c /FoC:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\test_flags.obj /arch:AVX512) aren't supported by the compiler, output ->
  cl : Command line warning D9002 : ignoring unknown option '/arch:AVX512'
  test_flags.c

  WARN: CCompilerOpt.cc_test_flags[1025] : testing failed
  WARN: CCompilerOpt.dist_test[590] : CCompilerOpt._dist_test_spawn[726] : Command (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /TcC:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c /FoC:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.obj /arch:AVX2 /WX) failed with exit status 2 output ->
  cpu_avx512cd.c
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2065: '__m512i': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2146: syntax error: missing ';' before identifier 'a'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): warning C4013: '_mm512_lzcnt_epi32' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): warning C4013: '_mm512_loadu_si512' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2146: syntax error: missing ')' before identifier '__m512i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2059: syntax error: ')'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2297: '*': illegal, right operand has type 'char *'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2143: syntax error: missing ')' before ';'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(19): warning C4013: '_mm512_castsi512_si128' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(19): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(19): error C2440: 'function': cannot convert from 'int' to '__m128i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(19): warning C4024: '_mm_cvtsi128_si32': different types for formal and actual parameter 1

  WARN: CCompilerOpt.feature_test[1490] : testing failed
  WARN: CCompilerOpt.dist_test[590] : CCompilerOpt._dist_test_spawn[726] : Command (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /TcC:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c /FoC:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.obj /arch:AVX2 /WX) failed with exit status 2 output ->
  cpu_avx512f.c
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2065: '__m512i': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2146: syntax error: missing ';' before identifier 'a'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): warning C4013: '_mm512_abs_epi32' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): warning C4013: '_mm512_loadu_si512' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2146: syntax error: missing ')' before identifier '__m512i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2059: syntax error: ')'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2297: '*': illegal, right operand has type 'char *'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2143: syntax error: missing ')' before ';'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(19): warning C4013: '_mm512_castsi512_si128' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(19): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(19): error C2440: 'function': cannot convert from 'int' to '__m128i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(19): warning C4024: '_mm_cvtsi128_si32': different types for formal and actual parameter 1

  WARN: CCompilerOpt.feature_test[1490] : testing failed
  WARN: CCompilerOpt.dist_test[590] : CCompilerOpt._dist_test_spawn[726] : Command (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /TcC:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c /FoC:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.obj /arch:AVX2 /WX) failed with exit status 2 output ->
  cpu_avx512_skx.c
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2065: '__m512i': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2146: syntax error: missing ';' before identifier 'aa'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2065: 'aa': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): warning C4013: '_mm512_abs_epi32' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): warning C4013: '_mm512_loadu_si512' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2146: syntax error: missing ')' before identifier '__m512i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2059: syntax error: ')'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2297: '*': illegal, right operand has type 'char *'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2143: syntax error: missing ')' before ';'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(20): warning C4013: '_mm256_abs_epi64' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(20): warning C4013: '_mm512_extracti64x4_epi64' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(20): error C2065: 'aa': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(22): error C2065: '__m512i': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(22): error C2146: syntax error: missing ';' before identifier 'b'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(22): error C2065: 'b': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(22): warning C4013: '_mm512_broadcast_i32x8' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(24): error C2065: 'b': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(24): warning C4013: '_mm512_abs_epi16' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(25): warning C4013: '_mm512_castsi512_si128' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(25): error C2065: 'b': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(25): error C2440: 'function': cannot convert from 'int' to '__m128i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(25): warning C4024: '_mm_cvtsi128_si32': different types for formal and actual parameter 1
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(20): error C2440: 'initializing': cannot convert from 'int' to '__m256i'

  WARN: CCompilerOpt.feature_test[1490] : testing failed
  WARN: CCompilerOpt.dist_test[590] : CCompilerOpt._dist_test_spawn[726] : Command (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /TcC:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c /FoC:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.obj /arch:AVX2 /WX) failed with exit status 2 output ->
  cpu_avx512_clx.c
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2065: '__m512i': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2146: syntax error: missing ';' before identifier 'a'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): warning C4013: '_mm512_loadu_si512' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2146: syntax error: missing ')' before identifier '__m512i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2059: syntax error: ')'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2297: '*': illegal, right operand has type 'char *'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2143: syntax error: missing ')' before ';'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(20): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(20): warning C4013: '_mm512_dpbusd_epi32' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(20): warning C4013: '_mm512_setzero_si512' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(21): warning C4013: '_mm512_castsi512_si128' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(21): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(21): error C2440: 'function': cannot convert from 'int' to '__m128i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(21): warning C4024: '_mm_cvtsi128_si32': different types for formal and actual parameter 1

  WARN: CCompilerOpt.feature_test[1490] : testing failed
  WARN: CCompilerOpt.generate_dispatch_header[2291] : dispatch header dir build\src.win-amd64-3.8\numpy\distutils\include does not exist, creating it
  creating build\temp.win-amd64-3.8
...
  creating build\temp.win-amd64-3.8\numpy\random\src\distributions
  running build_ext
  WARN: Missing compiler_cxx fix for MSVCCompiler
  creating build\temp.win-amd64-3.8\Release\build
...
  creating build\temp.win-amd64-3.8\Release\build\src.win-amd64-3.8\numpy\core\src\umath
  loops_trigonometric.dispatch.avx2.c
  numpy\core\src\npymath\npy_math_internal.h.src(897): warning C4244: 'return': conversion from 'unsigned short' to 'uint8_t', possible loss of data
  numpy\core\src\npymath\npy_math_internal.h.src(903): warning C4244: 'return': conversion from 'unsigned __int64' to 'uint8_t', possible loss of data
  numpy\core\src\umath\loops_trigonometric.dispatch.c.src(40): error C2059: syntax error: 'bad suffix on number'
  numpy\core\src\umath\loops_trigonometric.dispatch.c.src(40): warning C4305: 'function': truncation from 'double' to 'float'
...
  numpy\core\src\umath\loops_trigonometric.dispatch.c.src(109): warning C4305: 'function': truncation from 'double' to 'float'
  numpy\core\src\umath\loops_trigonometric.dispatch.c.src(110): error C2059: syntax error: 'bad suffix on number'
  Running from numpy source directory.
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\system_info.py:2077: UserWarning:
      Optimized (vendor) Blas libraries are not found.
      Falls back to netlib Blas library which has worse performance.
      A better performance should be easily gained by switching
      Blas library.
    if self._calc_info(blas):
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\system_info.py:2077: UserWarning:
      Blas (http://www.netlib.org/blas/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [blas]) or by setting
      the BLAS environment variable.
    if self._calc_info(blas):
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\system_info.py:2077: UserWarning:
      Blas (http://www.netlib.org/blas/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [blas_src]) or by setting
      the BLAS_SRC environment variable.
    if self._calc_info(blas):
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\system_info.py:1902: UserWarning:
      Lapack (http://www.netlib.org/lapack/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [lapack]) or by setting
      the LAPACK environment variable.
    return getattr(self, '_calc_info_{}'.format(name))()
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\system_info.py:1902: UserWarning:
      Lapack (http://www.netlib.org/lapack/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [lapack_src]) or by setting
      the LAPACK_SRC environment variable.
    return getattr(self, '_calc_info_{}'.format(name))()
  Warning: attempted relative import with no known parent package
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-build-env-qem0ndd3\overlay\Lib\site-packages\setuptools\_distutils\dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
    warnings.warn(msg)
  error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\umath -Inumpy\core\include -Ibuild\src.win-amd64-3.8\numpy\core\include/numpy -Ibuild\src.win-amd64-3.8\numpy\distutils\include -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /Tcbuild\src.win-amd64-3.8\numpy\core\src\umath\loops_trigonometric.dispatch.avx2.c /Fobuild\temp.win-amd64-3.8\Release\build\src.win-amd64-3.8\numpy\core\src\umath\loops_trigonometric.dispatch.avx2.obj /Zm1000 /O2 /arch:AVX2" failed with exit status 2
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects
```

答: Install using conda when you don't have clear set of dependencies available to install. Using conda install is a highly preferred way to install python packages.

ContentLicense: CC BY-SA 4.0

Body:
I am attempting to try out pypy, and I can install a few packages, but the important ones like Numpy and Pandas go boom!!!  I get similar issues if I try it within PyCharm.

see below.  Also at some point I also saw this error.

     Optimized (vendor) Blas libraries are not found.
      Falls back to netlib Blas library which has worse performance.
      A better performance should be easily gained by switching
      Blas library.

  Blas (http://www.netlib.org/blas/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [blas]) or by setting
      the BLAS environment variable.
```

```
pypy -m pip install --extra-index-url https://antocuni.github.io/pypy-wheels/manylinux2010 numpy

```
C:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64>pypy -m pip install --extra-index-url https://antocuni.github.io/pypy-wheels/manylinux2010 numpy
Looking in indexes: https://pypi.org/simple, https://antocuni.github.io/pypy-wheels/manylinux2010
warning: missing-index-doctype

The package index page being used does not have a proper HTML doctype declaration.

Problematic URL: https://antocuni.github.io/pypy-wheels/manylinux2010/numpy/

note: This is an issue with the page at the URL mentioned above.
hint: You might need to reach out to the owner of that package index, to get this fixed. See https://github.com/pypa/pip/issues/10825 for context.
Collecting numpy
  Using cached numpy-1.22.2.zip (11.4 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: numpy
  Building wheel for numpy (pyproject.toml) ... error
  error: subprocess-exited-with-error

  Building wheel for numpy (pyproject.toml) did not run successfully.
  exit code: 1

  [690 lines of output]
  Processing numpy/random\_bounded_integers.pxd.in
...
  Processing numpy/random\_sfc64.pyx
  Cythonizing sources
  WARN: Could not locate executable g77
  WARN: Could not locate executable f77
  WARN: Could not locate executable ifort
  WARN: Could not locate executable ifl
  WARN: Could not locate executable f90
  WARN: Could not locate executable DF
  WARN: Could not locate executable efl
  WARN: Could not locate executable gfortran
  WARN: Could not locate executable f95
  WARN: Could not locate executable g95
  WARN: Could not locate executable efort
  WARN: Could not locate executable efc
  WARN: Could not locate executable flang
  WARN: don't know how to compile Fortran code on platform 'nt'
  non-existing path in 'numpy\\distutils': 'site.cfg'
  running bdist_wheel
  running build
...
  creating build\src.win-amd64-3.8\numpy\core\src\multiarray
  BUILD_ARCHITECTURE: 'AMD64', os.name='nt', sys.platform='win32'
  non-existing path in 'numpy\\core': 'build\\src.win-amd64-3.8\\numpy\\core\\src\\common'
  creating build\src.win-amd64-3.8\numpy\core\src\common
...
  creating build\src.win-amd64-3.8\numpy\linalg
  ### Warning:  Using unoptimized lapack ###
  ### Warning:  Using unoptimized lapack ###
  running build_py
...
  creating C:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks
  WARN: CCompilerOpt.__init__[1169] : feature 'AVX512_KNL' is disabled, MSVC compiler doesn't support it
  WARN: CCompilerOpt.__init__[1169] : feature 'AVX512_KNM' is disabled, MSVC compiler doesn't support it
  WARN: CCompilerOpt.dist_test[590] : CCompilerOpt._dist_test_spawn[714] : Flags in command (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /TcC:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\test_flags.c /FoC:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\test_flags.obj /arch:AVX512) aren't supported by the compiler, output ->
  cl : Command line warning D9002 : ignoring unknown option '/arch:AVX512'
  test_flags.c

  WARN: CCompilerOpt.cc_test_flags[1025] : testing failed
  WARN: CCompilerOpt.dist_test[590] : CCompilerOpt._dist_test_spawn[726] : Command (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /TcC:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c /FoC:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.obj /arch:AVX2 /WX) failed with exit status 2 output ->
  cpu_avx512cd.c
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2065: '__m512i': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2146: syntax error: missing ';' before identifier 'a'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): warning C4013: '_mm512_lzcnt_epi32' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): warning C4013: '_mm512_loadu_si512' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2146: syntax error: missing ')' before identifier '__m512i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2059: syntax error: ')'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2297: '*': illegal, right operand has type 'char *'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(18): error C2143: syntax error: missing ')' before ';'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(19): warning C4013: '_mm512_castsi512_si128' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(19): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(19): error C2440: 'function': cannot convert from 'int' to '__m128i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512cd.c(19): warning C4024: '_mm_cvtsi128_si32': different types for formal and actual parameter 1

  WARN: CCompilerOpt.feature_test[1490] : testing failed
  WARN: CCompilerOpt.dist_test[590] : CCompilerOpt._dist_test_spawn[726] : Command (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /TcC:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c /FoC:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.obj /arch:AVX2 /WX) failed with exit status 2 output ->
  cpu_avx512f.c
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2065: '__m512i': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2146: syntax error: missing ';' before identifier 'a'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): warning C4013: '_mm512_abs_epi32' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): warning C4013: '_mm512_loadu_si512' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2146: syntax error: missing ')' before identifier '__m512i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2059: syntax error: ')'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2297: '*': illegal, right operand has type 'char *'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(18): error C2143: syntax error: missing ')' before ';'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(19): warning C4013: '_mm512_castsi512_si128' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(19): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(19): error C2440: 'function': cannot convert from 'int' to '__m128i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512f.c(19): warning C4024: '_mm_cvtsi128_si32': different types for formal and actual parameter 1

  WARN: CCompilerOpt.feature_test[1490] : testing failed
  WARN: CCompilerOpt.dist_test[590] : CCompilerOpt._dist_test_spawn[726] : Command (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /TcC:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c /FoC:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.obj /arch:AVX2 /WX) failed with exit status 2 output ->
  cpu_avx512_skx.c
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2065: '__m512i': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2146: syntax error: missing ';' before identifier 'aa'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2065: 'aa': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): warning C4013: '_mm512_abs_epi32' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): warning C4013: '_mm512_loadu_si512' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2146: syntax error: missing ')' before identifier '__m512i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2059: syntax error: ')'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2297: '*': illegal, right operand has type 'char *'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(18): error C2143: syntax error: missing ')' before ';'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(20): warning C4013: '_mm256_abs_epi64' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(20): warning C4013: '_mm512_extracti64x4_epi64' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(20): error C2065: 'aa': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(22): error C2065: '__m512i': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(22): error C2146: syntax error: missing ';' before identifier 'b'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(22): error C2065: 'b': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(22): warning C4013: '_mm512_broadcast_i32x8' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(24): error C2065: 'b': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(24): warning C4013: '_mm512_abs_epi16' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(25): warning C4013: '_mm512_castsi512_si128' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(25): error C2065: 'b': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(25): error C2440: 'function': cannot convert from 'int' to '__m128i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(25): warning C4024: '_mm_cvtsi128_si32': different types for formal and actual parameter 1
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_skx.c(20): error C2440: 'initializing': cannot convert from 'int' to '__m256i'

  WARN: CCompilerOpt.feature_test[1490] : testing failed
  WARN: CCompilerOpt.dist_test[590] : CCompilerOpt._dist_test_spawn[726] : Command (C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /TcC:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c /FoC:\Users\QUENTI~1\AppData\Local\Temp\tmp2x_oanlm\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.obj /arch:AVX2 /WX) failed with exit status 2 output ->
  cpu_avx512_clx.c
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2065: '__m512i': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2146: syntax error: missing ';' before identifier 'a'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): warning C4013: '_mm512_loadu_si512' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2146: syntax error: missing ')' before identifier '__m512i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2059: syntax error: ')'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2297: '*': illegal, right operand has type 'char *'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(19): error C2143: syntax error: missing ')' before ';'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(20): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(20): warning C4013: '_mm512_dpbusd_epi32' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(20): warning C4013: '_mm512_setzero_si512' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(21): warning C4013: '_mm512_castsi512_si128' undefined; assuming extern returning int
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(21): error C2065: 'a': undeclared identifier
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(21): error C2440: 'function': cannot convert from 'int' to '__m128i'
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\checks\cpu_avx512_clx.c(21): warning C4024: '_mm_cvtsi128_si32': different types for formal and actual parameter 1

  WARN: CCompilerOpt.feature_test[1490] : testing failed
  WARN: CCompilerOpt.generate_dispatch_header[2291] : dispatch header dir build\src.win-amd64-3.8\numpy\distutils\include does not exist, creating it
  creating build\temp.win-amd64-3.8
...
  creating build\temp.win-amd64-3.8\numpy\random\src\distributions
  running build_ext
  WARN: Missing compiler_cxx fix for MSVCCompiler
  creating build\temp.win-amd64-3.8\Release\build
...
  creating build\temp.win-amd64-3.8\Release\build\src.win-amd64-3.8\numpy\core\src\umath
  loops_trigonometric.dispatch.avx2.c
  numpy\core\src\npymath\npy_math_internal.h.src(897): warning C4244: 'return': conversion from 'unsigned short' to 'uint8_t', possible loss of data
  numpy\core\src\npymath\npy_math_internal.h.src(903): warning C4244: 'return': conversion from 'unsigned __int64' to 'uint8_t', possible loss of data
  numpy\core\src\umath\loops_trigonometric.dispatch.c.src(40): error C2059: syntax error: 'bad suffix on number'
  numpy\core\src\umath\loops_trigonometric.dispatch.c.src(40): warning C4305: 'function': truncation from 'double' to 'float'
...
  numpy\core\src\umath\loops_trigonometric.dispatch.c.src(109): warning C4305: 'function': truncation from 'double' to 'float'
  numpy\core\src\umath\loops_trigonometric.dispatch.c.src(110): error C2059: syntax error: 'bad suffix on number'
  Running from numpy source directory.
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\system_info.py:2077: UserWarning:
      Optimized (vendor) Blas libraries are not found.
      Falls back to netlib Blas library which has worse performance.
      A better performance should be easily gained by switching
      Blas library.
    if self._calc_info(blas):
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\system_info.py:2077: UserWarning:
      Blas (http://www.netlib.org/blas/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [blas]) or by setting
      the BLAS environment variable.
    if self._calc_info(blas):
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\system_info.py:2077: UserWarning:
      Blas (http://www.netlib.org/blas/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [blas_src]) or by setting
      the BLAS_SRC environment variable.
    if self._calc_info(blas):
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\system_info.py:1902: UserWarning:
      Lapack (http://www.netlib.org/lapack/) libraries not found.
      Directories to search for the libraries can be specified in the
      numpy/distutils/site.cfg file (section [lapack]) or by setting
      the LAPACK environment variable.
    return getattr(self, '_calc_info_{}'.format(name))()
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-install-a470u9k7\numpy_24426d81db7f45d5a2e20cd49f3e097f\numpy\distutils\system_info.py:1902: UserWarning:
      Lapack (http://www.netlib.org/lapack/) sources not found.
      Directories to search for the sources can be specified in the
      numpy/distutils/site.cfg file (section [lapack_src]) or by setting
      the LAPACK_SRC environment variable.
    return getattr(self, '_calc_info_{}'.format(name))()
  Warning: attempted relative import with no known parent package
  C:\Users\QUENTI~1\AppData\Local\Temp\pip-build-env-qem0ndd3\overlay\Lib\site-packages\setuptools\_distutils\dist.py:275: UserWarning: Unknown distribution option: 'define_macros'
    warnings.warn(msg)
  error: Command "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /O2 /W3 /GL /DNDEBUG /MD -DNPY_INTERNAL_BUILD=1 -DHAVE_NPY_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\umath -Inumpy\core\include -Ibuild\src.win-amd64-3.8\numpy\core\include/numpy -Ibuild\src.win-amd64-3.8\numpy\distutils\include -Inumpy\core\src\common -Inumpy\core\src -Inumpy\core -Inumpy\core\src\npymath -Inumpy\core\src\multiarray -Inumpy\core\src\umath -Inumpy\core\src\npysort -Inumpy\core\src\_simd -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -IC:\Users\Quentin_Sarafinchan\pypy\pypy3.8-v7.3.7-win64\include -Ibuild\src.win-amd64-3.8\numpy\core\src\common -Ibuild\src.win-amd64-3.8\numpy\core\src\npymath -IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\ucrt -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.14393.0\winrt /Tcbuild\src.win-amd64-3.8\numpy\core\src\umath\loops_trigonometric.dispatch.avx2.c /Fobuild\temp.win-amd64-3.8\Release\build\src.win-amd64-3.8\numpy\core\src\umath\loops_trigonometric.dispatch.avx2.obj /Zm1000 /O2 /arch:AVX2" failed with exit status 2
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for numpy
Failed to build numpy
ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects


问:
I am trying to sort the following data frame first in Points, then Wins, and then Cauntry alphabet
```<code>#I have tried this code. but Country column should be sorted vice versa!

df = pd.DataFrame(data, columns = ['Country','Wins','Loses','Draws','Goal_Diff','Points'])
df1=df.sort_values(by=['Points','Wins','Country'],ascending=False)
df1

#sort the following data frame first in Points, then Wins, and then Country (A-Z).
data= [['Iran', 1, 2, 0, -1, 3]
      ,['Spain', 0, 3, 0, -3, 0]
      ,['Portugal', 2, 1, 0, 0, 6]
      ,['Morocco', 3, 0, 0, 4, 9]]
#sort the data frame.
df = pd.DataFrame(data, columns =['Country','Wins','Loses','Draws','Goal_Diff','Points'])
df
</code>```

答:
```<code>import pandas as pd
#sort the following data frame first in Points, then Wins, and then Country (A-Z).
data= [['Iran', 1, 2, 0, -1, 3]
      ,['Spain', 0, 3, 0, -3, 0]
      ,['Portugal', 2, 1, 0, 0, 6]
      ,['Morocco', 3, 0, 0, 4, 9]]
#sort the data frame.
df = pd.DataFrame(data, columns =['Country','Wins','Loses','Draws','Goal_Diff','Points'])
df.sort_values(by=['Points','Wins','Country'],ascending=(False,False,True), inplace=True)
df
</code>```

So you can provide multiple boolean values to attribute ascending=(True, False, ...)

Body:
import pandas as pd
#sort the following data frame first in Points, then Wins, and then Country (A-Z).
data= [['Iran', 1, 2, 0, -1, 3]
      ,['Spain', 0, 3, 0, -3, 0]
      ,['Portugal', 2, 1, 0, 0, 6]
      ,['Morocco', 3, 0, 0, 4, 9]]
#sort the data frame.
df = pd.DataFrame(data, columns =['Country','Wins','Loses','Draws','Goal_Diff','Points'])
df.sort_values(by=['Points','Wins','Country'],ascending=(False,False,True), inplace=True)
df

So you can provide multiple boolean values to attribute ascending=(True, False, ...)


问:
HttpResponseException when trying to retrieve xml file using groovy script
It always catches the exception and outputs "Unable to read data for $dId:$alias" when I run read():

```<code>http = new HTTPBuilder('https://somewebsite.com')

def read(http, path, dId, alias, portalFile, outputFileName) {

   try {
     println "Reading : path:$path, file:$portalFile"

         http.get(path: path,
           contentType: TEXT,
           query: [id:dId, instance:alias, format:'xml', file:portalFile]) {resp, reader ->

           println "response status: ${resp.statusLine}"
         println 'Headers: -----------'
       resp.headers.each { h ->
            println " ${h.name} : ${h.value}"
       }

       new File(outputFileName).withWriter{out -> out << reader}
        }
  } catch (HttpResponseException h) {
    println "Unable to read data for $dId:$alias"
  }
}
</code>```

If I go to the website using my internet browser and click on the xml file that I need, it works. Is there any way I can output the URL that it connects to?

答:
The best thing to do to see where things are going on wrong is to enable wire debugging for http builder - this will show you the exact requests and responses that are happening. From this you can see what URL is being fetched, with what parameters and headers, and what came back from the server.

Enabling debugging is documented here - http://groovy.codehaus.org/modules/http-builder/doc/index.html#Logging_and_Debugging

E.g. add the following to your log4j.properties

```<code>log4j.logger.org.apache.http.headers=DEBUG
log4j.logger.org.apache.http.wire=DEBUG
</code>```

Or, quicker and dirtier, put this right at the top of your groovy script (YMMV)

```<code>System.setProperty('org.apache.commons.logging.Log', 'org.apache.commons.logging.impl.SimpleLog')
System.setProperty('org.apache.commons.logging.simplelog.log.org.apache.http.wire', 'DEBUG')
</code>```

ContentLicense: CC BY-SA 3.0

Body:
It always catches the exception and outputs "Unable to read data for $dId:$alias" when I run read():

http = new HTTPBuilder('https://somewebsite.com')

def read(http, path, dId, alias, portalFile, outputFileName) {

   try {
     println "Reading : path:$path, file:$portalFile"

         http.get(path: path,
           contentType: TEXT,
           query: [id:dId, instance:alias, format:'xml', file:portalFile]) {resp, reader ->

           println "response status: ${resp.statusLine}"
         println 'Headers: -----------'
       resp.headers.each { h ->
            println " ${h.name} : ${h.value}"
       }

       new File(outputFileName).withWriter{out -> out << reader}
        }
  } catch (HttpResponseException h) {
    println "Unable to read data for $dId:$alias"
  }
}

If I go to the website using my internet browser and click on the xml file that I need, it works. Is there any way I can output the URL that it connects to?

Body:
The best thing to do to see where things are going on wrong is to enable wire debugging for http builder - this will show you the exact requests and responses that are happening. From this you can see what URL is being fetched, with what parameters and headers, and what came back from the server.

Enabling debugging is documented here - http://groovy.codehaus.org/modules/http-builder/doc/index.html#Logging_and_Debugging

E.g. add the following to your log4j.properties

log4j.logger.org.apache.http.headers=DEBUG
log4j.logger.org.apache.http.wire=DEBUG

Or, quicker and dirtier, put this right at the top of your groovy script (YMMV)

System.setProperty('org.apache.commons.logging.Log', 'org.apache.commons.logging.impl.SimpleLog')
System.setProperty('org.apache.commons.logging.simplelog.log.org.apache.http.wire', 'DEBUG')


问:
Power Automate parse JSON with dynamic property name
I am working on a flow to gather information from API and load it to the database.

However, while getting the response from the API call, one of the property names is variable per account.

Then the schema I am getting from the API call is like this:

```<code>{
  "type": "object",
  "properties": {
    "12305": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    }
  }
}
</code>```

The property "12305" from the response varies from account to account. And I need to go through all accounts in one run.

Unfortunately, it is not possible to add variable content to the Schema value of the Parse JSON action.

Does anyone know the solution for that, please?

答:
When you call this API, do you have the Account number available? or how are you querying the information to this API?

Option 1:

Assuming you get an account number or an array of account numbers that you have to process, you can use that schema and just set the variable for the account number to get the response.

This is an example with one account number, if you have an array you'll just have to create an "Apply to each" action

Here is the flow run for this method

The variable:

Option 2

If you do not have the account number, and are using other data to query this account's information, then it gets interesting, and you have to parse the response from the API as a string. Fortunately this is a simple schema so it will be something like this:

After we get the response from the API, the action "Get Account Number from API's JSON response 1" will find the first double quote character (since we know there will only be one property according to the schema) that will give us the starting index of the account number. Then, on action "Set variable" we search for the second double quote character (closing string) and now we have the account number from the response. After that, we parse the response using the schema you already have and then get the array of integers using the variable we set.

Here is the flow run for this method

Expressions shown in the examples (Please note that if you change the actions names you'll have to update this expressions so that it can match your actions. Also I am not validating the response from the API)

body('Parse_JSON')?[variables('AccountNumber')]

substring(outputs('JSON_response'),add(indexOf(outputs('JSON_response'),'"'),1))

substring(outputs('Get_Account_Number_from_API''s_JSON_response_1'),0,indexOf(outputs('Get_Account_Number_from_API''s_JSON_response_1'),'"'))

Body:
I am working on a flow to gather information from API and load it to the database.

However, while getting the response from the API call, one of the property names is variable per account.

Then the schema I am getting from the API call is like this:

{
  "type": "object",
  "properties": {
    "12305": {
      "type": "array",
      "items": {
        "type": "integer"
      }
    }
  }
}

The property "12305" from the response varies from account to account. And I need to go through all accounts in one run.

Unfortunately, it is not possible to add variable content to the Schema value of the Parse JSON action.

Does anyone know the solution for that, please?


问:
How to show old data of `select` element in Laravel?
How to show old data of select element in Laravel?

Data can be shown in input like this:

```<code><input id="name" name="name" class="form-control" type="text" value="{{ old('name', $user->name) }}">
</code>```

when the element is select,how to show the old data?

```<code><select class="form-control" name="gender">
    <option value="male">male</option>
    <option value="female">female</option>
</select>
</code>```

答:
this code show old value if validation fail otherwise show value of element</p>
```<code><select class="form-control" name="gender">
    <option value="male" {{old('gender',$user->gender) == 'male' ? 'selected': ''}}>male</option>
    <option value="female" {{old('gender',$user->gender) == 'female' ? 'selected': ''}} >female</option>
</select>
</code>```

Body:
How to show old data of select element in Laravel?

Data can be shown in input like this:

<input id="name" name="name" class="form-control" type="text" value="{{ old('name', $user->name) }}">

when the element is select,how to show the old data?

<select class="form-control" name="gender">
    <option value="male">male</option>
    <option value="female">female</option>
</select>

Body:
this code show old value if validation fail otherwise show value of element

<select class="form-control" name="gender">
    <option value="male" {{old('gender',$user->gender) == 'male' ? 'selected': ''}}>male</option>
    <option value="female" {{old('gender',$user->gender) == 'female' ? 'selected': ''}} >female</option>
</select>


问:
RealityKit - How to get rendered frame?
So session delegate allows me to get a frame that contains camera image + some details. But how can I get something similar from RealityKit. Like a frame of rendered objects + shadows without background?

I'd like to do my own post-frame rendering in metal. So have realityKit render nice meshes and then do adjustments to the resulting frame myself & render to my own surface.

Regards
Dariusz

答:
TLDR

You can add a session delegate to RealityKit's ARView: arView.session.delegate = sessionDelegate

SwiftUI

The Following is a how you could implement a session delegate with SwiftUI:

```<code>class SessionDelegate<ARContainer: UIViewRepresentable>: NSObject, ARSessionDelegate {
    var arVC: ARContainer
    var arGameView : ARView?

    init(_ control: ARContainer) {
        self.arVC = control
    }

    func setARView(_ arView: ARView){
        arGameView = arView // get access the arView
    }

    func session(_ session: ARSession, didUpdate anchors : [ARAnchor]) {}
    func session(_ session: ARSession, didUpdate frame: ARFrame) {
       print("frame", frame)
    }
    func session(_ session: ARSession, didAdd anchors: [ARAnchor]) {}
    func session(_ session: ARSession, didRemove anchors: [ARAnchor]) {}
}
</code>```

Make your delegate available to your UIViewRepresentable through the makeCoordinator function:

```<code>struct CameraARContainer: UIViewRepresentable {

    func makeCoordinator() -> SessionDelegate<Self>{
        SessionDelegate<Self>(self)
    }

    func makeUIView(context: Context) -> ARView {
        let arView = ARGameView(frame: .zero)
        arView.session.delegate = context.coordinator
        context.coordinator.setARView(arView)
        return arView
    }

    func updateUIView(_ uiView: ARView, context: Context) {}
}
</code>```

Title: RealityKit - How to get rendered frame?

Body:
TLDR

You can add a session delegate to RealityKit's ARView: arView.session.delegate = sessionDelegate

SwiftUI

The Following is a how you could implement a session delegate with SwiftUI:

class SessionDelegate<ARContainer: UIViewRepresentable>: NSObject, ARSessionDelegate {
    var arVC: ARContainer
    var arGameView : ARView?

    init(_ control: ARContainer) {
        self.arVC = control
    }

    func setARView(_ arView: ARView){
        arGameView = arView // get access the arView
    }

    func session(_ session: ARSession, didUpdate anchors : [ARAnchor]) {}
    func session(_ session: ARSession, didUpdate frame: ARFrame) {
       print("frame", frame)
    }
    func session(_ session: ARSession, didAdd anchors: [ARAnchor]) {}
    func session(_ session: ARSession, didRemove anchors: [ARAnchor]) {}
}

Make your delegate available to your UIViewRepresentable through the makeCoordinator function:

struct CameraARContainer: UIViewRepresentable {

    func makeCoordinator() -> SessionDelegate<Self>{
        SessionDelegate<Self>(self)
    }

    func makeUIView(context: Context) -> ARView {
        let arView = ARGameView(frame: .zero)
        arView.session.delegate = context.coordinator
        context.coordinator.setARView(arView)
        return arView
    }

    func updateUIView(_ uiView: ARView, context: Context) {}
}


问:
setting state with useState affects all useState hooks
I am trying to build an ecommerce website, and I hit a problem I cannot seem to resolve. I am very new to react and JS so have some patience please :)

I declared 4 useStates in my app.js:

```<code>const [elementeDinState, setElementeDinState] = useState([]);
const [currentCategorie, setCurrentCategorie] = useState("Acasa");
const [subCategorie, setSubcategorie] = useState([]);
const [cartContents, setCartContents] = useState([]);

const fetchData = useCallback(async () => {
    const data = await getCategories();
    setElementeDinState(data);
  }, []);
  useEffect(() => {
    fetchData().catch(console.error);
  }, [fetchData]);

const changeHeader = (dataFromMenuItem) => {
    setCurrentCategorie(dataFromMenuItem);
  };

const changeCopiiContent = (data1FromThere) => {
    setSubcategorie(data1FromThere);
  };

const changeCart = (dataFromCart) => {
    setCartContents(dataFromCart);
  };
</code>```

I am passing the functions to change those states to different child components as props. my problem is, when I add items to cart it triggers a re render of my component (products listing component) that should not be affected by cartContents and that resets the state of said component to the initial value that changes the items being shown. does useState hook create a single global state comprised of all those states?

答: well, seems like I wanted to change the way react works so I figured out a work around, based on what you guys told me. I declared the state of the productsComponent in the parent component and adding to cart now doesn't force a refresh of the items being shown. thank you!</p>

Body:
I am trying to build an ecommerce website, and I hit a problem I cannot seem to resolve. I am very new to react and JS so have some patience please :)

I declared 4 useStates in my app.js:

const [elementeDinState, setElementeDinState] = useState([]);
const [currentCategorie, setCurrentCategorie] = useState("Acasa");
const [subCategorie, setSubcategorie] = useState([]);
const [cartContents, setCartContents] = useState([]);

const fetchData = useCallback(async () => {
    const data = await getCategories();
    setElementeDinState(data);
  }, []);
  useEffect(() => {
    fetchData().catch(console.error);
  }, [fetchData]);

const changeHeader = (dataFromMenuItem) => {
    setCurrentCategorie(dataFromMenuItem);
  };

const changeCopiiContent = (data1FromThere) => {
    setSubcategorie(data1FromThere);
  };

const changeCart = (dataFromCart) => {
    setCartContents(dataFromCart);
  };

I am passing the functions to change those states to different child components as props. my problem is, when I add items to cart it triggers a re render of my component (products listing component) that should not be affected by cartContents and that resets the state of said component to the initial value that changes the items being shown. does useState hook create a single global state comprised of all those states?


问:
How to check if Email exists , throw error if so , and create user if no match with Sequelize and Express?
I am trying to check if the req.body.email already exists in the
db, then I would like to throw error, if not in the db , then try and create my user... But this is failing its only returning email is in system even if i change the email can anyone help me with this one please ?</p>
```<code>const User = require("../models/users");

const createSingleUser = async (req, res) => {
  // we need to make sure the provided email is not being used if it exists in the db
  // them we through an error if not then we create the user
  // step one lets search by the email provided
  const checkEmail = req.body.email;
  const found = await User.findOne({
    where: {
      email: checkEmail,
    },
  });
  // if found is not empty meaning a match was found
  if (found != "") {
    res.send("this email is already in system");
  } else {
    // create the user since its empty no match found
    try {
      const newUser = await User.create({
        firstName: req.body.firstName,
        lastName: req.body.lastName,
        dateOfBirth: req.body.dateOfBirth,
        email: req.body.email,
        phone: req.body.phone,
      });
      User.sync({ alter: true });
      res.send(await newUser);
    } catch (err) {
      res.send(err);
    }
  }
};

module.exports = createSingleUser;
</code>```

答:
You should also give us a log of what found contains, but with a guess maybe try changing this line:

```<code>if (found != "")
</code>```

to line below:

```<code>if (found)
</code>```

Body:
I am trying to check if the req.body.email already exists in the
db, then I would like to throw error, if not in the db , then try and create my user... But this is failing its only returning email is in system even if i change the email can anyone help me with this one please ?

const User = require("../models/users");

const createSingleUser = async (req, res) => {
  // we need to make sure the provided email is not being used if it exists in the db
  // them we through an error if not then we create the user
  // step one lets search by the email provided
  const checkEmail = req.body.email;
  const found = await User.findOne({
    where: {
      email: checkEmail,
    },
  });
  // if found is not empty meaning a match was found
  if (found != "") {
    res.send("this email is already in system");
  } else {
    // create the user since its empty no match found
    try {
      const newUser = await User.create({
        firstName: req.body.firstName,
        lastName: req.body.lastName,
        dateOfBirth: req.body.dateOfBirth,
        email: req.body.email,
        phone: req.body.phone,
      });
      User.sync({ alter: true });
      res.send(await newUser);
    } catch (err) {
      res.send(err);
    }
  }
};

module.exports = createSingleUser;

Body:
You should also give us a log of what found contains, but with a guess maybe try changing this line:

if (found != "")

to line below:

if (found)


问:
Joomla Translation Extension - The simplest way
Can anyone point out an extension where we can add articles in another language, the point is to allow the user to create an article similar to the ones already existent and write them in another language, so that, when the users clicks the flag of that language, the articles (and menu) will switch to those is English.

According to joomla documentation I can answer this questions like so:

Is the site structure of all languages the same or do I have different "views"?
 - The same;

Do I need language related content such as different products in a shop?
 - No.

Are regions/countries related to languages or is the new language primarily a translation?
 - related;

Do I have different authors, publishers and so on for my various languages?
 - No.

Do I need a professional translation for my site or is an automated translation (e.g. by Google) acceptable?
 - No.

I have found only extensions that deal with automatic translations or with locale files and stuff like that, and the intended is something really simple, without any of those stuff.

Any help would be greatly appreciated.

Thanks

答:
You can use Joomfish to create fully manageable multilingual website using Joomla

The problem with Joomfish is it's not compatible with Joomla 1.7

If you wanted to create multilingual website using Joomla 1.7 you should check this article


问:
How to restrict function parameter's type to properties of struct in Swift
Let me show an example first

```<code>import Foundation

struct Animal {
    struct Cat {
        let description = "It's a cat"
    }

    struct Dog {
        let description = "It's a dog"
    }
}

// Restrict its input to properties of struct Animal
func feedAnimal(type: Animal.Cat or Animal.Dog) {
    print(type.description)
}

feedAnimal(type: Animal.Cat())
// It's a cat

feedAnimal(type: Animal.Dog())
// It's a dog

</code>```

I want to restrict my function's parameter type to properties of specific struct not the struct itself.

Are there any ways to implement this in Swift? If so, please let me know.

Thanks!

答:
You are describing the functionality of a protocol

```<code>protocol Animal {
    var description : String { get }
}

struct Cat : Animal {
    let description = "It's a cat"
}

struct Dog : Animal {
    let description = "It's a dog"
}

// Restrict its input to properties of struct Animal
func feedAnimal(type: Animal) {
    print(type.description)
}

feedAnimal(type: Cat())
// It's a cat

feedAnimal(type: Dog())
// It's a dog
</code>```

You can even declare the feed function in a protocol extension

```<code>protocol Animal {
    var description : String { get }
    func feed()
}

extension Animal {
    func feed() {
        print(self.description)
    }
}

struct Cat : Animal {
    let description = "It's a cat"
}

struct Dog : Animal {
    let description = "It's a dog"
}

Cat().feed()
// It's a cat

Dog().feed()
// It's a dog

</code>```

Body:
Let me show an example first

import Foundation

struct Animal {
    struct Cat {
        let description = "It's a cat"
    }

    struct Dog {
        let description = "It's a dog"
    }
}

// Restrict its input to properties of struct Animal
func feedAnimal(type: Animal.Cat or Animal.Dog) {
    print(type.description)
}

feedAnimal(type: Animal.Cat())
// It's a cat

feedAnimal(type: Animal.Dog())
// It's a dog

I want to restrict my function's parameter type to properties of specific struct not the struct itself.

Are there any ways to implement this in Swift? If so, please let me know.

Thanks!

Body:
You are describing the functionality of a protocol

protocol Animal {
    var description : String { get }
}

struct Cat : Animal {
    let description = "It's a cat"
}

struct Dog : Animal {
    let description = "It's a dog"
}

// Restrict its input to properties of struct Animal
func feedAnimal(type: Animal) {
    print(type.description)
}

feedAnimal(type: Cat())
// It's a cat

feedAnimal(type: Dog())
// It's a dog

You can even declare the feed function in a protocol extension

protocol Animal {
    var description : String { get }
    func feed()
}

extension Animal {
    func feed() {
        print(self.description)
    }
}

struct Cat : Animal {
    let description = "It's a cat"
}

struct Dog : Animal {
    let description = "It's a dog"
}

Cat().feed()
// It's a cat

Dog().feed()
// It's a dog


问:
How to implement moving/animated infographics in an ionic application?
I want to create custom infographics for my ionic application, something like you see under:
https://in.pinterest.com/pin/10203536643808929/

Any suggestions on what tool I can use to create such infographics or any specific implementation strategy I could use?

答:
Not adding entire implementation, but this would point you in a right direction:

You can implement the infographics using ion-slides. Place the info. in each slide. https://ionicframework.com/docs/api/slides.

```<code><ion-slides pager="false" >
        <ion-slide>
          <h1>Slide 1</h1>
        </ion-slide>
        <ion-slide>
          <h1>Slide 2</h1>
        </ion-slide>
        <ion-slide>
          <h1>Slide 3</h1>
        </ion-slide>
  </ion-slides>
</code>```

For animated background, you need to keep the content of the slides transparent & add some background animation to the container div

Body:
Not adding entire implementation, but this would point you in a right direction:

You can implement the infographics using ion-slides. Place the info. in each slide. https://ionicframework.com/docs/api/slides.

<ion-slides pager="false" >
        <ion-slide>
          <h1>Slide 1</h1>
        </ion-slide>
        <ion-slide>
          <h1>Slide 2</h1>
        </ion-slide>
        <ion-slide>
          <h1>Slide 3</h1>
        </ion-slide>
  </ion-slides>

For animated background, you need to keep the content of the slides transparent & add some background animation to the container div


问:
What the logic behind b1 ? b1 : b2 in my coding in if-conditions?
1.Here is the assignment.

Declare a function or that works like ||, but without using the || operator.
/**

@param {any} ??? - the first operand

@param {any} ??? - the second operand

@returns {any} the same result as applying the || operator to the given operands, in order

2.Here is what tried(actually people gave me advice on return b1 ? b1 : b2.But i couldn't understand it ,and haven't found a proper explanation about it online.

```<code>function or(b1, b2) {
  if (b1 == false && b2 == false) return false;
  else return b1 ? b1 : b2;
}
</code>```

3.Here are the coding tests, and the code above passed all of them. But would anyone tell me the logic of b1 ? b1 : b2. I am a beginner, please help me !

//TEST 1

```<code>actual = or("bananas", false);

expected = "bananas";

if (actual === expected) {
  console.log("Yay! Test PASSED.");
} else {
  console.error("Test FAILED. Keep trying!");
  console.log("    actual: ", actual);
  console.log("  expected: ", expected);
}
</code>```

//TEST 2

```<code>actual = or("", "bananas");

expected = "bananas";

if (actual === expected) {
  console.log("Yay! Test PASSED.");
} else {
  console.error("Test FAILED. Keep trying!");
  console.log("    actual: ", actual);
  console.log("  expected: ", expected);
}
</code>```

//TEST 3

```<code>actual = or(true, true);

expected = true;

if (actual === expected) {
  console.log("Yay! Test PASSED.");
} else {
  console.error("Test FAILED. Keep trying!");
  console.log("    actual: ", actual);
  console.log("  expected: ", expected);
}
</code>```

//TEST 4

```<code>actual = or(true, false);

expected = true;

if (actual === expected) {
  console.log("Yay! Test PASSED.");
} else {
  console.error("Test FAILED. Keep trying!");
  console.log("    actual: ", actual);
  console.log("  expected: ", expected);
}
</code>```

答:
You can replace or function like this.

```<code>function or(b1, b2) {
  if (b1) return b1;
  if (b2) return b2;
  return false;
}
</code>```

Body:
1.Here is the assignment.

Declare a function or that works like ||, but without using the || operator.
/**

@param {any} ??? - the first operand

@param {any} ??? - the second operand

@returns {any} the same result as applying the || operator to the given operands, in order

2.Here is what tried(actually people gave me advice on return b1 ? b1 : b2.But i couldn't understand it ,and haven't found a proper explanation about it online.

function or(b1, b2) {
  if (b1 == false && b2 == false) return false;
  else return b1 ? b1 : b2;
}

3.Here are the coding tests, and the code above passed all of them. But would anyone tell me the logic of b1 ? b1 : b2. I am a beginner, please help me !

//TEST 1

actual = or("bananas", false);

expected = "bananas";

if (actual === expected) {
  console.log("Yay! Test PASSED.");
} else {
  console.error("Test FAILED. Keep trying!");
  console.log("    actual: ", actual);
  console.log("  expected: ", expected);
}

//TEST 2

actual = or("", "bananas");

expected = "bananas";

if (actual === expected) {
  console.log("Yay! Test PASSED.");
} else {
  console.error("Test FAILED. Keep trying!");
  console.log("    actual: ", actual);
  console.log("  expected: ", expected);
}

//TEST 3

actual = or(true, true);

expected = true;

if (actual === expected) {
  console.log("Yay! Test PASSED.");
} else {
  console.error("Test FAILED. Keep trying!");
  console.log("    actual: ", actual);
  console.log("  expected: ", expected);
}

//TEST 4

actual = or(true, false);

expected = true;

if (actual === expected) {
  console.log("Yay! Test PASSED.");
} else {
  console.error("Test FAILED. Keep trying!");
  console.log("    actual: ", actual);
  console.log("  expected: ", expected);
}

Body:
You can replace or function like this.

function or(b1, b2) {
  if (b1) return b1;
  if (b2) return b2;
  return false;
}


问:
when i try to create react app ,i get " template was not provided ,This is likely because you're using an outdated version of create-react-app " Error
when i try to install react app  with following code

```<code>npx create-react-app app1
</code>```

i get following problem

```<code> A template was not provided. This is likely because you're using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.
You can fix this by running npm uninstall -g create-react-app or yarn global remove create-react-app before using create-react-app again.
</code>```

i tried npm uninstall -g create-react-app and still it gives the same error , i don't know where the issue lies.

my system info

```<code>os : Windows 10 64 bit
nodeJs  : v14.15.0
npm  : v6.14.8
</code>```

is this a problem with the node version..? How to solve the issues

答:
Implement the following steps:
Write this code into your editor:
npm install --global yarn
And then upgrade:
yarn global upgrade
Create your app. You can choose your app name:
yarn create react-app your-app-name
Go to your app directory:
cd your-app-name

Body:
when i try to install react app  with following code

npx create-react-app app1

i get following problem

 A template was not provided. This is likely because you're using an outdated version of create-react-app.
Please note that global installs of create-react-app are no longer supported.
You can fix this by running npm uninstall -g create-react-app or yarn global remove create-react-app before using create-react-app again.

i tried npm uninstall -g create-react-app and still it gives the same error , i don't know where the issue lies.

my system info

os : Windows 10 64 bit
nodeJs  : v14.15.0
npm  : v6.14.8

is this a problem with the node version..? How to solve the issues