Setting up dev env

I am trying to set up dev environment on MacOS using conda which results in following error:
ResolvePackageNotFound:

  • firefox
  • geckodriver

I tried to add these packages under pip section in environment.yml file and tried to run conda env update but still facing same issue.

I also installed firefox browser but it didn’t help either.

How to install these packages on MacOS?

What exact command are you running? I have e.g. geckodriver conda-installed on OSX.

I am following this guide and ran conda env create -f environment.yml but the installation fails.
I even tried to run conda env update after adding these packages under pip section in environment.yml but it fails too.

I’m not really sure what could be going on on your system. I just ran

conda env create -f environment.yml -n discourse-test

on OSX and it succeeded. I guess try giving the env an explicit (new, unique) name as I have done above? Or here are more specific “test” env files in the ci subdirectory you could try one of those. I guess making sure your conda is up to date as well.

I tried but same issue:

I am on M1 mac (macOS 12.5), any other idea on what should I try?

Ah, that’s got to be the problem. I think you will have to edit the env files to remove those packages, since they don’t exist for your architecture (at least not yet). You won’t be able to run some of the more involved selenium tests (there are not many).

ah I see, thanks for the help! I am able to install the python dependencies.

For selenium tests with M1 macs would you recommend some other driver that I can try to port to? or are those tests gecko specific?

I would just skip them locally e.g. with -m "not selenium" pytest selector. In case you make a PR, all the tests are always run in CI.

1 Like