Skip to content
This repository has been archived by the owner on Feb 20, 2024. It is now read-only.

Miniconda venv not working with this package #22

Open
clacladev opened this issue Apr 11, 2022 · 2 comments
Open

Miniconda venv not working with this package #22

clacladev opened this issue Apr 11, 2022 · 2 comments

Comments

@clacladev
Copy link

Hello. I followed the advices of this issue to enable miniconda venv for this package. But it's not working.

If I disable use venv and nile use venv options, I get another error: /opt/homebrew/bin/starknet-compile: /opt/homebrew/opt/[email protected]/bin/python3.9: bad interpreter: No such file or directory.

If I re-enable them but I put ~/.miniconda3/condabin/conda activate starknet-dev-env in venv command, I get the error Your shell has not been properly configured to use 'conda activate'. Miniconda is properly set and working and it is setup in the shell too. But for some reason it is not recognised.

What do you suggest me to do?

More details:

  • macOS Monterey
  • M1 MacBook
  • I have installed cairo-nile with pip in the venv I am trying to enable
@ericglau
Copy link
Owner

ericglau commented Apr 12, 2022

Hi @ccarnino, the extension just appends the venv command before running the compiler. If the use venv options are disabled, the compiler should be in the PATH before starting VSCode.

Can you try the following as a workaround?

  1. Quit VScode
  2. Use miniconda to activate your environment in a standalone terminal.
  3. From that same terminal, start VSCode (see https://code.visualstudio.com/docs/setup/mac#_launching-from-the-command-line)
  4. Disable the useVenv and nileUseVenv options in the VSCode settings under the Cairo LS section.

@0xMoonwalker
Copy link

0xMoonwalker commented Oct 19, 2022

I also hit the same issue and although the @ericglau workaround is working, I found more convenient to configure the shell in cairols.nileVenvCommand and cairols.venvCommand. In my case I added the following lines in the project's settings.json.

"cairols.nileVenvCommand": ". ~/anaconda3/etc/profile.d/conda.sh && conda activate starknet",
"cairols.venvCommand": ". ~/anaconda3/etc/profile.d/conda.sh && conda activate starknet",

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants