Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error finding numpy in vs code #1133

Open
6 tasks
MarcellGranat opened this issue Jun 11, 2022 · 5 comments
Open
6 tasks

Error finding numpy in vs code #1133

MarcellGranat opened this issue Jun 11, 2022 · 5 comments
Labels
bug Something isn't working needs-repro Issues that are blocked until reporter provides an adequate reproduction python-setup Issues with Python's environment and setup
Milestone

Comments

@MarcellGranat
Copy link

Bug description

My issue is that quarto cannot found numpy package if the file is rendered in vs code. Works perfectly RStudio, or if a cell is simple ran, but fails if I try to render the file. I enclose a pic about the error message.

2022-06-11_23 32 26

Checklist

  • formatted your issue so it is easier for us to read?
  • included a minimal, self-contained, and reproducible example?
  • documented the quarto version you're running, by providing the output produced by quarto check in a terminal in your issue?
  • documented the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
  • documented which operating system you're running? If on Linux, please provide the specific distribution as well.
  • upgraded to the latest version, including your versions of R, the RStudio IDE, and relevant R packages?
@MarcellGranat MarcellGranat added the bug Something isn't working label Jun 11, 2022
@jjallaire
Copy link
Collaborator

Hi there, thanks for reporting this. There is some kind of tangle up regarding Python and multiple architectures going on here. This isn't really related to the Quarto VS Code extension but more to how your particular shell is configured and how VS Code constructs terminal environments. Unfortunately it's nearly impossible for us to debug this without having direct hands on your system.

If you run this Google search you'll see others with the same problem and explore whether their solutions would work for you: "multiarray import error need arm64 have x86_64"

Note also that the Quarto VS Code extension will automatically use the currently configured Python version (as specified via the "Python: Select Interpreter" command).

@jjallaire jjallaire added this to the Future milestone Jun 12, 2022
@iainmwallace
Copy link

I have the same issue - I am able to run the sample code in a python console in the terminal environment that clicking on render button creates.

Screen Shot 2022-08-09 at 3 31 23 PM

If I try and re-run the quarto command after this, I get the same error as reported above.

I get a disconnect when I run the codes suggested by this issue - nteract/hydrogen#2147
Rendering with Quarto incorrectly returns X86 as the platform, while VS Code returns ARM64

The code I ran was

import platform
platform.machine()

Hope this helps, thanks

@chaz-clark
Copy link

@MarcellGranat and @iainmwallace do you both have a M1 or M2 Mac?

@iainmwallace
Copy link

I have M1 pro chip

@mcanouil
Copy link
Collaborator

This is a Python setup issue.
For instance, I have no issue at all:

---
title: "Quarto Playground"
format: html
---

This is a playground for Quarto.

```{python}
import numpy

print("works!")
```
image

So to keep this issue open, we would need to have the exact steps to reproduce this error and actual code to work with.

@mcanouil mcanouil added needs-repro Issues that are blocked until reporter provides an adequate reproduction python-setup Issues with Python's environment and setup labels Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-repro Issues that are blocked until reporter provides an adequate reproduction python-setup Issues with Python's environment and setup
Projects
None yet
Development

No branches or pull requests

5 participants