econ-ark / HARK

Heterogenous Agents Resources & toolKit
Apache License 2.0
315 stars 195 forks source link

Module not found... numpy? #1384

Closed alanlujan91 closed 3 months ago

alanlujan91 commented 3 months ago
image

Error says numpy is not installed, mamba (and conda) say it is installed and part of the env.

this is my environment.yml file

name: solvingmicrodsops
channels:
  - conda-forge
dependencies:
  - python=3.10
  - pip
  - pip:
      - git+https://github.com/econ-ark/HARK@master
alanlujan91 commented 3 months ago

I know enough about paths and terminals to break stuff, so this could be a local issue.

mnwhite commented 3 months ago

The condaforge thing is one of the outstanding elements of the version update, as I had never worked with it at all. Was hoping to get Seb to help me out today. I suspect this is related.

On Wed, Feb 14, 2024 at 11:32 AM Alan Lujan @.***> wrote:

I know enough about paths and terminals to break stuff, so this could be a local issue.

— Reply to this email directly, view it on GitHub https://github.com/econ-ark/HARK/issues/1384#issuecomment-1944186742, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKRAFONYNLR2SGORWHMWW3YTTRIXAVCNFSM6AAAAABDISZWR2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBUGE4DMNZUGI . You are receiving this because you were assigned.Message ID: @.***>

alanlujan91 commented 3 months ago

@mnwhite I'm not sure if this would be related to conda-forge

This is installing python=3.10 from conda-forge, but using pip to install master branch of econ-ark. So when you see where numpy is coming from, it says it's from a pypi channel.

MridulS commented 3 months ago

Just tried this, works just fine for me?

Copied over the yaml config, then ran mamba env create -f req.yml.

$ mamba activate solvingmicrodsops
$ python -c 'import numpy; print(numpy.__version__)'
1.26.4
Mv77 commented 3 months ago

I had this happen to me before and it was a weird issue with local VScode environments. This is probably not coming from the repo.

alanlujan91 commented 3 months ago

Yeah I uninstalled and reinstalled Python and it worked!