# Installation error: No module named compas.\_\_main\_\_

**URL:** <https://forum.compas-framework.org/t/installation-error-no-module-named-compas-main/561>\
**Category:** getting started\
**Created:** [February 13, 2022, 1:49pm UTC](https://forum.compas-framework.org/t/installation-error-no-module-named-compas-main/561 "2022-02-13T13:49:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lars](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@Lars](https://forum.compas-framework.org/u/Lars)\
**Post date:** [February 13, 2022, 1:49pm UTC](https://forum.compas-framework.org/t/installation-error-no-module-named-compas-main/561/1 "2022-02-13T13:49:27Z")

</div>

Hi COMPAS developers,

I’m installing COMPAS as newbie.

I installed Anaconda, created as mentioned [on your website](https://compas.dev/compas/latest/installation.html) with Terminal a new environment with conda, installed COMPAS from the package channel conda-forge and activated the environment (named ‘research’). ‘conda list’ shows me that the compas package is in the research environment (version 1.14.0).

However, when running ‘python -m compas’, I receive the following error:  
`../bin/python: No module named compas. __main__ ; 'compas' is a package and cannot be directly executed`

From what I read, it should not be an issue with PATH, as I installed using ‘conda’?  
Any idea how to get it running (although it says to be installed)?  
Thanks!

Lars

Specifications: MacOS 12.1 Monterey  
When running Conda info in the ‘research’ environment:

```auto
 active environment : research
    active env location : /Users/myusername/opt/anaconda3/envs/research
            shell level : 2
       user config file : /Users/myusername/.condarc
 populated config files : /Users/myusername/.condarc
          conda version : 4.11.0
    conda-build version : 3.21.5
         python version : 3.9.7.final.0
       virtual packages : __osx=10.16=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /Users/myusername/opt/anaconda3 (writable)
      conda av data dir : /Users/myusername/opt/anaconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://conda.anaconda.org/conda-forge/osx-64
                          https://conda.anaconda.org/conda-forge/noarch
                          https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /Users/myusername/opt/anaconda3/pkgs
                          /Users/myusername/.conda/pkgs
       envs directories : /Users/myusername/opt/anaconda3/envs
                          /Users/myusername/.conda/envs
               platform : osx-64
             user-agent : conda/4.11.0 requests/2.26.0 CPython/3.9.7 Darwin/21.2.0 OSX/10.16
                UID:GID : 501:20
             netrc file : None
           offline mode : False

```

---

<div class="post-metadata">

**Author:** ![Lars](https://avatars.discourse-cdn.com/v4/letter/l/74df32/32.png) [@Lars](https://forum.compas-framework.org/u/Lars)\
**Post date:** [February 14, 2022, 1:10pm UTC](https://forum.compas-framework.org/t/installation-error-no-module-named-compas-main/561/2 "2022-02-14T13:10:37Z")

</div>

I found the solution and it indeed was related with path:  
Python searches in different paths. Apparently Python was also looking at a path created several years ago for an old version of compas, which contains erroneous files.

For the newbies, check the paths using:

```auto
import sys
sys.path

```

Best!  
Lars

---

<div class="post-metadata">

**Author:** ![tomvanmele](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.compas-framework.org/tomvanmele/32/13_2.png) [@tomvanmele](https://forum.compas-framework.org/u/tomvanmele)\
**Post date:** [February 22, 2022, 8:00am UTC](https://forum.compas-framework.org/t/installation-error-no-module-named-compas-main/561/3 "2022-02-22T08:00:55Z")

</div>

hi lars,

happy to hear the problem is solved 🙂

about the path thing.

a long time a go, adding COMPAS related stuff directly to `PATH` was indeed part of the setup process. now this is no longer needed. in fact, not even Anaconda should be on `PATH` as per their own recommendations.

therefore, to prevent potential future errors, i would recommend to remove anything related to Python, and especially COMPAS, from `PATH` since this now tends to be managed by your terminal or IDE without requiring global changes to the system…
