Ask coding questions

← Back to all posts
polygott python import error
[deleted]

I have a python-polygot repl, however, when I try and import from another folder, it says that it cannot find the folder. How can I fix it?

Comments
hotnewtop
[deleted]

@theangryepicbanana I dont know. Just showed up. I did not add that

theangryepicbanana (1693)

@TaylorLiang ok next question, what is this line doing here export PYTHONPATH=<src>:$PYTHONPATH

[deleted]

@theangryepicbanana thats what stackoverflow told me to do

theangryepicbanana (1693)

@TaylorLiang did it tell you where to put it in the makefile?

theangryepicbanana (1693)

@TaylorLiang you might want to move it to the .run section and see what happens

[deleted]
theangryepicbanana (1693)

@TaylorLiang hmm. what happened when you ran it with the default "run-project" command?

[deleted]

@theangryepicbanana I fixed it. I had to add a init.py to the src folder

Vandesm14 (2642)

Try using a .replit file:

run="python ide.py"
[deleted]

@Vandesm14 nah, I want to add support to windows + linux

[deleted]

@Vandesm14 still wont work

Highwayman (1455)

It should be src/wordCompleter, no?

[deleted]

@Highwayman still wont work