Error in pycharm

0

Good morning,

In the following example,

And I'm experiencing the following error in pycharm:

/home/brito/projetos/venv/saj_projects/bin/python /home/brito/projetos/saj_projects/exemplos/me/impressao_tratamento.py
Traceback (most recent call last):
  File "/home/brito/projetos/saj_projects/exemplos/me/impressao_tratamento.py", line 16, in <module>
    from incolumepy.utils.files import realfilename
ModuleNotFoundError: No module named 'incolumepy.utils'

And in the environment

$ source ~/projetos/venv/saj_projects/bin/activate

(saj_projects) $ pip freeze
...
idna==2.7
incolumepy.utils==0.9.3
jdcal==1.4
kiwisolver==1.0.1
...

When running python from environment directly outside of pycharm:

(saj_projects)$ python
Python 3.7.0 (default, Jul 10 2018, 10:36:19) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> from incolumepy.utils.files import realfilename
>>> dir()
['__annotations__', '__builtins__', '__doc__', '__loader__', '__name__', '__package__', '__spec__', 'realfilename']

How to correct the pycharm configuration?

    
asked by anonymous 10.07.2018 / 17:09

1 answer

0

I found the solution. Following:

In the main menu:

  • Run > Edit Configurations ...

In the window that opens, the left select the problematic project ... on the right select the Configuration subbase.

In the Enviroment subtopic, there are two options: "add content root to PATHOPATH" and "add source root to PYTHONPATH"

>
  • Keep only "add content root to PATHOPATH" selected
29.07.2018 / 14:21