title: How to force the PyCharm IDE to recognize the packages installed in my python environment during development inside the IDE itself?
body: <p>I am familiar with conda, pip, envs and pycharm and of course see this question before <a href="https://stackoverflow.com/questions/31235376/pycharm-doesnt-recognise-installed-module">PyCharm doesn&#39;t recognise installed module</a> -- which has been useless to me so far. Pycharm says that my library <code>uutils</code> is not installed but when I go to the terminal and import it works just fine (from my terminal):</p>
  <pre><code>(iit-term-synthesis) brandomiranda~ ❯ python
  Python 3.9.12 (main, Jun  1 2022, 06:36:29)
  [Clang 12.0.0 ] :: Anaconda, Inc. on darwin
  Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
  &gt;&gt;&gt; import uutils
  &gt;&gt;&gt; uutils.helloworld()
  
  hello from uutils __init__.py in:
  &lt;module 'uutils' from '/Users/brandomiranda/ultimate-utils/ultimate-utils-proj-src/uutils/__init__.py'&gt;
  
  &gt;&gt;&gt;
  </code></pre>
  <p>In pycharm's terminal:</p>
  <pre><code>(iit-term-synthesis) brandomiranda~/ultimate-utils ❯ python
  Python 3.9.12 (main, Jun  1 2022, 06:36:29) 
  [Clang 12.0.0 ] :: Anaconda, Inc. on darwin
  Type &quot;help&quot;, &quot;copyright&quot;, &quot;credits&quot; or &quot;license&quot; for more information.
  &gt;&gt;&gt; import uutils
  &gt;&gt;&gt; uutils.helloworld()
  
  hello from uutils __init__.py in:
  &lt;module 'uutils' from '/Users/brandomiranda/ultimate-utils/ultimate-utils-proj-src/uutils/__init__.py'&gt;
  
  &gt;&gt;&gt; 
  </code></pre>
  <p>from pycharm's console:</p>
  <pre><code>/Users/brandomiranda/miniconda/envs/iit-term-synthesis/bin/python /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevconsole.py --mode=client --host=127.0.0.1 --port=55783 
  import sys; print('Python %s on %s' % (sys.version, sys.platform))
  sys.path.extend(['/Users/brandomiranda/ultimate-utils', '/Users/brandomiranda/iit-term-synthesis', '/Users/brandomiranda/proverbot9001', '/Users/brandomiranda/ultimate-utils', '/Users/brandomiranda/pycoq', '/Users/brandomiranda/ultimate-utils/ultimate-utils-proj-src', '/Users/brandomiranda/iit-term-synthesis', '/Users/brandomiranda/iit-term-synthesis/iit-term-synthesis-src', '/Users/brandomiranda/ultimate-utils/ultimate-utils-proj-src', '/Users/brandomiranda/ultimate-utils'])
  Python 3.9.12 (main, Jun  1 2022, 06:36:29) 
  Type 'copyright', 'credits' or 'license' for more information
  IPython 8.4.0 -- An enhanced Interactive Python. Type '?' for help.
  PyDev console: using IPython 8.4.0
  Python 3.9.12 (main, Jun  1 2022, 06:36:29) 
  [Clang 12.0.0 ] on darwin
  import uutils
  uutils.helloworld()
  hello from uutils __init__.py in:
  &lt;module 'uutils' from '/Users/brandomiranda/ultimate-utils/ultimate-utils-proj-src/uutils/__init__.py'&gt;
  </code></pre>
  <p>from debugger works fine:</p>
  <pre><code>/Users/brandomiranda/miniconda/envs/iit-term-synthesis/bin/python /Applications/PyCharm.app/Contents/plugins/python/helpers/pydev/pydevd.py --cmd-line --multiprocess --qt-support=auto --client 127.0.0.1 --port 55789 --file /Users/brandomiranda/iit-term-synthesis/iit-term-synthesis-src/mains/main_debug_lf.py 
  Connected to pydev debugger (build 222.3345.131)
  import uutils
  Python 3.9.12 (main, Jun  1 2022, 06:36:29) 
  Type 'copyright', 'credits' or 'license' for more information
  IPython 8.4.0 -- An enhanced Interactive Python. Type '?' for help.
  PyDev console: using IPython 8.4.0
  uutils.helloworld()
  hello from uutils __init__.py in:
  &lt;module 'uutils' from '/Users/brandomiranda/ultimate-utils/ultimate-utils-proj-src/uutils/__init__.py'&gt;
  </code></pre>
  <p>However, when one looks at the IDE it underlines <code>uutils</code> in red and thus does not autocomplete and do all the nice features of PyCharm:
  <a href="https://i.stack.imgur.com/N3zje.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N3zje.png" alt="enter image description here" /></a>
  however, the demo right before I just showed does import it if I run it! It bizzare. Of course I've set up the pycharm interpeter (and in fact removed it multiple times and re-insalled everything with bran new envs and it doesn't work!):</p>
  <p><a href="https://i.stack.imgur.com/OHmmh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OHmmh.png" alt="enter image description here" /></a></p>
  <p>I def have the right conda env:
  <a href="https://i.stack.imgur.com/40JU6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/40JU6.png" alt="enter image description here" /></a></p>
  <p>I've tried removing it and re-installing the env from:</p>
  <ul>
  <li>the terminal</li>
  <li>from within pycharm</li>
  </ul>
  <p>I've also tried removing all the <code>.idea</code> folders and started from scratch e.g. as mentioned here: <a href="https://stackoverflow.com/a/73336726/1601580">https://stackoverflow.com/a/73336726/1601580</a></p>
  <p>I've also:</p>
  <ul>
  <li>uninstalled pycharm and re-installed it</li>
  <li>updated pycharm</li>
  </ul>
  <p>I can also see the projects are in pip list:</p>
  <pre><code>(iit-term-synthesis) brandomiranda~ ❯ pip list
  Package                 Version      Editable project location
  ----------------------- ------------ --------------------------------------------------------------
  absl-py                 1.2.0
  aiofile                 3.8.1
  aiohttp                 3.8.1
  aiosignal               1.2.0
  appnope                 0.1.3
  astroid                 2.11.7
  asttokens               2.0.7
  async-timeout           4.0.2
  attrs                   22.1.0
  backcall                0.2.0
  cachetools              5.2.0
  caio                    0.9.7
  certifi                 2022.6.15
  charset-normalizer      2.1.0
  click                   8.1.3
  cycler                  0.11.0
  dataclasses-json        0.5.7
  datasets                2.4.0
  debugpy                 1.6.2
  decorator               5.1.1
  dill                    0.3.5.1
  docker-pycreds          0.4.0
  entrypoints             0.4
  executing               0.9.1
  filelock                3.8.0
  fonttools               4.34.4
  frozenlist              1.3.1
  fsspec                  2022.7.1
  gitdb                   4.0.9
  GitPython               3.1.27
  google-auth             2.10.0
  google-auth-oauthlib    0.4.6
  grpcio                  1.47.0
  huggingface-hub         0.8.1
  idna                    3.3
  iit-term-synthesis      0.0.1        /Users/brandomiranda/iit-term-synthesis/iit-term-synthesis-src
  importlib-metadata      4.12.0
  iniconfig               1.1.1
  ipykernel               6.15.1
  ipython                 8.4.0
  isort                   5.10.1
  jedi                    0.18.1
  joblib                  1.1.0
  jupyter-client          7.3.4
  jupyter-core            4.11.1
  kiwisolver              1.4.4
  lark-parser             0.12.0
  lazy-object-proxy       1.7.1
  Markdown                3.4.1
  MarkupSafe              2.1.1
  marshmallow             3.17.0
  marshmallow-enum        1.5.1
  matplotlib              3.5.3
  matplotlib-inline       0.1.3
  mccabe                  0.7.0
  multidict               6.0.2
  multiprocess            0.70.13
  mypy-extensions         0.4.3
  nest-asyncio            1.5.5
  networkx                2.8.5
  numpy                   1.23.1
  oauthlib                3.2.0
  packaging               21.3
  pandas                  1.4.3
  parso                   0.8.3
  pathos                  0.2.9
  pathtools               0.1.2
  pexpect                 4.8.0
  pickleshare             0.7.5
  Pillow                  9.2.0
  pip                     22.1.2
  platformdirs            2.5.2
  plotly                  5.10.0
  pluggy                  1.0.0
  pox                     0.3.1
  ppft                    1.7.6.5
  progressbar2            4.0.0
  promise                 2.3
  prompt-toolkit          3.0.30
  protobuf                3.19.4
  psutil                  5.9.1
  ptyprocess              0.7.0
  pure-eval               0.2.2
  py                      1.11.0
  py-cpuinfo              8.0.0
  pyarrow                 9.0.0
  pyasn1                  0.4.8
  pyasn1-modules          0.2.8
  pycoq                   0.0.1a1.dev3 /Users/brandomiranda/pycoq
  Pygments                2.12.0
  pylint                  2.14.5
  pyparsing               3.0.9
  pytest                  7.1.2
  pytest-benchmark        3.4.1
  python-dateutil         2.8.2
  python-utils            3.3.3
  pytoolconfig            1.2.2
  pytz                    2022.2
  PyYAML                  6.0
  pyzmq                   23.2.1
  regex                   2022.7.25
  requests                2.28.1
  requests-oauthlib       1.3.1
  responses               0.18.0
  rope                    1.3.0
  rsa                     4.9
  scikit-learn            1.1.2
  scipy                   1.9.0
  sentry-sdk              1.9.4
  setproctitle            1.3.2
  setuptools              61.2.0
  sexpdata                0.0.3
  shortuuid               1.0.9
  six                     1.16.0
  smmap                   5.0.0
  stack-data              0.3.0
  strace-parser           0.2.0
  tenacity                8.0.1
  tensorboard             2.10.0
  tensorboard-data-server 0.6.1
  tensorboard-plugin-wit  1.8.1
  threadpoolctl           3.1.0
  tokenizers              0.12.1
  tomli                   2.0.1
  tomlkit                 0.11.3
  torch                   1.9.1
  torchaudio              0.9.1
  torchtext               0.10.1
  torchvision             0.10.1
  tornado                 6.2
  tqdm                    4.64.0
  traitlets               5.3.0
  transformers            4.21.1
  typing_extensions       4.3.0
  typing-inspect          0.7.1
  ultimate-utils          0.5.5        /Users/brandomiranda/ultimate-utils/ultimate-utils-proj-src
  urllib3                 1.26.11
  wandb                   0.13.1
  wcwidth                 0.2.5
  Werkzeug                2.2.2
  wheel                   0.37.1
  wrapt                   1.14.1
  xxhash                  3.0.0
  yarl                    1.8.1
  zipp                    3.8.1
  (iit-term-synthesis) brandomiranda~ ❯ conda list
  # packages in environment at /Users/brandomiranda/miniconda/envs/iit-term-synthesis:
  #
  # Name                    Version                   Build  Channel
  absl-py                   1.2.0                    pypi_0    pypi
  aiofile                   3.8.1                    pypi_0    pypi
  aiohttp                   3.8.1                    pypi_0    pypi
  aiosignal                 1.2.0                    pypi_0    pypi
  appnope                   0.1.3                    pypi_0    pypi
  astroid                   2.11.7                   pypi_0    pypi
  asttokens                 2.0.7                    pypi_0    pypi
  async-timeout             4.0.2                    pypi_0    pypi
  attrs                     22.1.0                   pypi_0    pypi
  backcall                  0.2.0                    pypi_0    pypi
  ca-certificates           2022.07.19           hecd8cb5_0
  cachetools                5.2.0                    pypi_0    pypi
  caio                      0.9.7                    pypi_0    pypi
  certifi                   2022.6.15        py39hecd8cb5_0
  charset-normalizer        2.1.0                    pypi_0    pypi
  click                     8.1.3                    pypi_0    pypi
  cycler                    0.11.0                   pypi_0    pypi
  dataclasses-json          0.5.7                    pypi_0    pypi
  datasets                  2.4.0                    pypi_0    pypi
  debugpy                   1.6.2                    pypi_0    pypi
  decorator                 5.1.1                    pypi_0    pypi
  dill                      0.3.5.1                  pypi_0    pypi
  docker-pycreds            0.4.0                    pypi_0    pypi
  entrypoints               0.4                      pypi_0    pypi
  executing                 0.9.1                    pypi_0    pypi
  filelock                  3.8.0                    pypi_0    pypi
  fonttools                 4.34.4                   pypi_0    pypi
  frozenlist                1.3.1                    pypi_0    pypi
  fsspec                    2022.7.1                 pypi_0    pypi
  gitdb                     4.0.9                    pypi_0    pypi
  gitpython                 3.1.27                   pypi_0    pypi
  google-auth               2.10.0                   pypi_0    pypi
  google-auth-oauthlib      0.4.6                    pypi_0    pypi
  grpcio                    1.47.0                   pypi_0    pypi
  huggingface-hub           0.8.1                    pypi_0    pypi
  idna                      3.3                      pypi_0    pypi
  iit-term-synthesis        0.0.1                     dev_0    &lt;develop&gt;
  importlib-metadata        4.12.0                   pypi_0    pypi
  iniconfig                 1.1.1                    pypi_0    pypi
  ipykernel                 6.15.1                   pypi_0    pypi
  ipython                   8.4.0                    pypi_0    pypi
  isort                     5.10.1                   pypi_0    pypi
  jedi                      0.18.1                   pypi_0    pypi
  joblib                    1.1.0                    pypi_0    pypi
  jupyter-client            7.3.4                    pypi_0    pypi
  jupyter-core              4.11.1                   pypi_0    pypi
  kiwisolver                1.4.4                    pypi_0    pypi
  lark-parser               0.12.0                   pypi_0    pypi
  lazy-object-proxy         1.7.1                    pypi_0    pypi
  libcxx                    12.0.0               h2f01273_0
  libffi                    3.3                  hb1e8313_2
  markdown                  3.4.1                    pypi_0    pypi
  markupsafe                2.1.1                    pypi_0    pypi
  marshmallow               3.17.0                   pypi_0    pypi
  marshmallow-enum          1.5.1                    pypi_0    pypi
  matplotlib                3.5.3                    pypi_0    pypi
  matplotlib-inline         0.1.3                    pypi_0    pypi
  mccabe                    0.7.0                    pypi_0    pypi
  multidict                 6.0.2                    pypi_0    pypi
  multiprocess              0.70.13                  pypi_0    pypi
  mypy-extensions           0.4.3                    pypi_0    pypi
  ncurses                   6.3                  hca72f7f_3
  nest-asyncio              1.5.5                    pypi_0    pypi
  networkx                  2.8.5                    pypi_0    pypi
  numpy                     1.23.1                   pypi_0    pypi
  oauthlib                  3.2.0                    pypi_0    pypi
  openssl                   1.1.1q               hca72f7f_0
  packaging                 21.3                     pypi_0    pypi
  pandas                    1.4.3                    pypi_0    pypi
  parso                     0.8.3                    pypi_0    pypi
  pathos                    0.2.9                    pypi_0    pypi
  pathtools                 0.1.2                    pypi_0    pypi
  pexpect                   4.8.0                    pypi_0    pypi
  pickleshare               0.7.5                    pypi_0    pypi
  pillow                    9.2.0                    pypi_0    pypi
  pip                       22.1.2           py39hecd8cb5_0
  platformdirs              2.5.2                    pypi_0    pypi
  plotly                    5.10.0                   pypi_0    pypi
  pluggy                    1.0.0                    pypi_0    pypi
  pox                       0.3.1                    pypi_0    pypi
  ppft                      1.7.6.5                  pypi_0    pypi
  progressbar2              4.0.0                    pypi_0    pypi
  promise                   2.3                      pypi_0    pypi
  prompt-toolkit            3.0.30                   pypi_0    pypi
  protobuf                  3.19.4                   pypi_0    pypi
  psutil                    5.9.1                    pypi_0    pypi
  ptyprocess                0.7.0                    pypi_0    pypi
  pure-eval                 0.2.2                    pypi_0    pypi
  py                        1.11.0                   pypi_0    pypi
  py-cpuinfo                8.0.0                    pypi_0    pypi
  pyarrow                   9.0.0                    pypi_0    pypi
  pyasn1                    0.4.8                    pypi_0    pypi
  pyasn1-modules            0.2.8                    pypi_0    pypi
  pycoq                     0.0.1a1.dev3             pypi_0    pypi
  pygments                  2.12.0                   pypi_0    pypi
  pylint                    2.14.5                   pypi_0    pypi
  pyparsing                 3.0.9                    pypi_0    pypi
  pytest                    7.1.2                    pypi_0    pypi
  pytest-benchmark          3.4.1                    pypi_0    pypi
  python                    3.9.12               hdfd78df_1
  python-dateutil           2.8.2                    pypi_0    pypi
  python-utils              3.3.3                    pypi_0    pypi
  pytoolconfig              1.2.2                    pypi_0    pypi
  pytz                      2022.2                   pypi_0    pypi
  pyyaml                    6.0                      pypi_0    pypi
  pyzmq                     23.2.1                   pypi_0    pypi
  readline                  8.1.2                hca72f7f_1
  regex                     2022.7.25                pypi_0    pypi
  requests                  2.28.1                   pypi_0    pypi
  requests-oauthlib         1.3.1                    pypi_0    pypi
  responses                 0.18.0                   pypi_0    pypi
  rope                      1.3.0                    pypi_0    pypi
  rsa                       4.9                      pypi_0    pypi
  scikit-learn              1.1.2                    pypi_0    pypi
  scipy                     1.9.0                    pypi_0    pypi
  sentry-sdk                1.9.4                    pypi_0    pypi
  setproctitle              1.3.2                    pypi_0    pypi
  setuptools                61.2.0           py39hecd8cb5_0
  sexpdata                  0.0.3                    pypi_0    pypi
  shortuuid                 1.0.9                    pypi_0    pypi
  six                       1.16.0                   pypi_0    pypi
  smmap                     5.0.0                    pypi_0    pypi
  sqlite                    3.39.2               h707629a_0
  stack-data                0.3.0                    pypi_0    pypi
  strace-parser             0.2.0                    pypi_0    pypi
  tenacity                  8.0.1                    pypi_0    pypi
  tensorboard               2.10.0                   pypi_0    pypi
  tensorboard-data-server   0.6.1                    pypi_0    pypi
  tensorboard-plugin-wit    1.8.1                    pypi_0    pypi
  threadpoolctl             3.1.0                    pypi_0    pypi
  tk                        8.6.12               h5d9f67b_0
  tokenizers                0.12.1                   pypi_0    pypi
  tomli                     2.0.1                    pypi_0    pypi
  tomlkit                   0.11.3                   pypi_0    pypi
  torch                     1.9.1                    pypi_0    pypi
  torchaudio                0.9.1                    pypi_0    pypi
  torchtext                 0.10.1                   pypi_0    pypi
  torchvision               0.10.1                   pypi_0    pypi
  tornado                   6.2                      pypi_0    pypi
  tqdm                      4.64.0                   pypi_0    pypi
  traitlets                 5.3.0                    pypi_0    pypi
  transformers              4.21.1                   pypi_0    pypi
  typing-extensions         4.3.0                    pypi_0    pypi
  typing-inspect            0.7.1                    pypi_0    pypi
  tzdata                    2022a                hda174b7_0
  ultimate-utils            0.5.5                     dev_0    &lt;develop&gt;
  urllib3                   1.26.11                  pypi_0    pypi
  wandb                     0.13.1                   pypi_0    pypi
  wcwidth                   0.2.5                    pypi_0    pypi
  werkzeug                  2.2.2                    pypi_0    pypi
  wheel                     0.37.1             pyhd3eb1b0_0
  wrapt                     1.14.1                   pypi_0    pypi
  xxhash                    3.0.0                    pypi_0    pypi
  xz                        5.2.5                hca72f7f_1
  yarl                      1.8.1                    pypi_0    pypi
  zipp                      3.8.1                    pypi_0    pypi
  zlib                      1.2.12               h4dc903c_2
  (iit-term-synthesis) brandomiranda~ ❯
  </code></pre>
  <p>I've tried in the past doing <code>conda develop .</code> to them to but that failed. I will try that again in a bit.</p>
  <p>At this point I don't know what else to do. Any suggestions would be helpful.</p>
  <p>cross:</p>
  <ul>
  <li><a href="https://intellij-support.jetbrains.com/hc/en-us/community/posts/7122004478738-How-to-force-pycharm-recognize-the-packages-installed-in-my-python-environment-" rel="nofollow noreferrer">https://intellij-support.jetbrains.com/hc/en-us/community/posts/7122004478738-How-to-force-pycharm-recognize-the-packages-installed-in-my-python-environment-</a></li>
  <li><a href="https://www.reddit.com/r/pycharm/comments/wmvnh7/how_to_force_the_pycharm_ide_to_recognize_the/" rel="nofollow noreferrer">https://www.reddit.com/r/pycharm/comments/wmvnh7/how_to_force_the_pycharm_ide_to_recognize_the/</a></li>
  <li><a href="https://www.quora.com/unanswered/How-do-I-force-the-PyCharm-IDE-to-recognize-the-packages-installed-in-my-Python-environment-during-development-inside-the-IDE-itself" rel="nofollow noreferrer">https://www.quora.com/unanswered/How-do-I-force-the-PyCharm-IDE-to-recognize-the-packages-installed-in-my-Python-environment-during-development-inside-the-IDE-itself</a></li>
  </ul>