OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Not the same sys.path in a shell and in Spyder

  • Thread starter Thread starter servoz
  • Start date Start date
S

servoz

Guest
Why isn't the sys.path in Spyder the same as in a shell?

In a shell, python -c "import sys ; print(sys.path)" doesn't give the same thing as if I stop the script at the first line with a breakpoint to do in the debugging console import sys ; print(sys.path).

I've managed to get around the issue by defining the necessary directories in Tools > PYTHONPATH Manager, but I find the method rather dirty as the sys.path is correct outside Spyder ...
<p>Why isn't the <code>sys.path</code> in Spyder the same as in a shell?</p>
<p>In a shell, <code>python -c "import sys ; print(sys.path)"</code> doesn't give the same thing as if I stop the script at the first line with a breakpoint to do in the debugging console <code>import sys ; print(sys.path)</code>.</p>
<p>I've managed to get around the issue by defining the necessary directories in Tools > PYTHONPATH Manager, but I find the method rather dirty as the <code>sys.path</code> is correct outside Spyder ...</p>
 

Latest posts

I
Replies
0
Views
1
impact christian
I
Top