Error in pycharm

Asked

Viewed 741 times

0

Good morning, everyone,

In "file>Settings>project: ... > project interpreter" the environment has been configured: "/home/Brito/projetos/venv/saj_projects/bin/python"

And I’m experiencing the following mistake in the 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 environment python directly outside 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 proceed to fix pycharm configuration?

1 answer

0


I found the solution. Follow:

On the main menu:

  • Run > Edit Configurations...

In the window that opens, on the left select the problematic project... on the right select the subaba(ear) Configuration.

In the Sub-topic Enviroment, there will be two options: "add content root to PATHOPATH" and "add source root to PYTHONPATH"

  • Keep selected only "add content root to PATHOPATH"

Browser other questions tagged

You are not signed in. Login or sign up in order to post.