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

Python stopped recognizing packages [closed]

  • Thread starter Thread starter multus
  • Start date Start date
M

multus

Guest
I was making a utility on python 3.9.13 that involves several libraries, everything went smoothly while I was testing it in Terminus (a Sublime package that opens a terminal), but then I tried to use matplotlib and the plotting window didn't open (I'm not sure, if the issue is in my code). I've tried testing it out in my regular (WIN) terminal, but it has given me a Python modules not found error. I've reloaded my PC, used exit commands, and now even Terminus doesn't "see" my libraries.

Pip3 shows, that all of my libraries are installed, and doesn't indicate any conflicts between them. I've tried -m, but to no avail. I assume, that my troubles are caused by Visual Studio (installed, but never used for Python).
Apparently, VS has relocated (or reinstalled) python somewhere inside itself (C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python39_64\\python.exe specifically, instead of ‪C:\Program Files\Python38\python.exe, if that's of any help). Deleting VS is not an option currently, but I'm curious if there is a way to somehow detach python from it, and if that has something to do with my problem.

The closest thing to an MRE would be:

Code:
import networkx

with ModuleNotFoundError: No module named 'networkx' error in both Terminus and regular terminal
However, the described behavior is inconsistent, so it's not really "reproducible" (and it's the main reason I'm even asking this question).
<p>I was making a utility on python 3.9.13 that involves several libraries, everything went smoothly while I was testing it in Terminus (<a href="https://packagecontrol.io/packages/Terminus" rel="nofollow noreferrer">a Sublime package that opens a terminal</a>), but then I tried to use matplotlib and the plotting window didn't open (I'm not sure, if the issue is in my code). I've tried testing it out in my regular (WIN) terminal, but it has given me a <code>Python modules not found</code> error. I've reloaded my PC, used <code>exit</code> commands, and now even Terminus doesn't "see" my libraries.</p>
<p>Pip3 shows, that all of my libraries are installed, and doesn't indicate any conflicts between them. I've tried <code>-m</code>, but to no avail. I assume, that my troubles are caused by Visual Studio (installed, but never used for Python).<br />
Apparently, VS has relocated (or reinstalled) python somewhere inside itself (<code>C:\\Program Files (x86)\\Microsoft Visual Studio\\Shared\\Python39_64\\python.exe</code> specifically, instead of <code>‪C:\Program Files\Python38\python.exe</code>, if that's of any help). Deleting VS is not an option currently, but I'm curious if there is a way to somehow detach python from it, and if that has something to do with my problem.</p>
<p>The closest thing to an MRE would be:</p>
<pre class="lang-py prettyprint-override"><code>import networkx
</code></pre>
<p>with <code>ModuleNotFoundError: No module named 'networkx'</code> error in both Terminus and regular terminal<br />
However, the described behavior is inconsistent, so it's not really "reproducible" (and it's the main reason I'm even asking this question).</p>
 

Online statistics

Members online
0
Guests online
3
Total visitors
3
Top