1

I am using renderdocui interactive python shell to import inspect but I get this error:

>> import inspect
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named inspect

I have installed python using Ananconda in Windows 10.

C:\Users\mona>ananconda search -t conda inspect
'ananconda' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\mona>conda install inspect
Fetching package metadata .........
Solving package specifications: .


PackageNotFoundError: Package not found: '' Package missing in current win-64 channels:
  - inspect

You can search for packages on anaconda.org with

    anaconda search -t conda inspect

How should I fix this?

enter image description here

Mona Jalal
  • 34,860
  • 64
  • 239
  • 408
  • Do you by any chance have a file called inspect.py in your local directory or search path? It's possible Python is finding that and erroneously trying to import it instead of the actual module. – Chris Larson Dec 30 '16 at 03:22
  • What happens if you try this line in the shell: import sys; print('\n'.join(sys.path) ) Or if that one doesn't work, try this one: import sys; print '\n'.join(sys.path) – Chris Larson Dec 30 '16 at 04:20

1 Answers1

2

First of all, you are mis-typing Anaconda in your examples within your question.

C:\Users\mona>ananconda search -t conda inspect

should read:

C:\Users\mona>anaconda search -t conda inspect

It's probable that you need to tell renderdocui how to find your Python interpreter. On Windows, you path is probably along the lines of:

C:\Users\Jane Smith\anaconda\bin\python

I can't find much if any documentation on renderdocui, but if you have any documentation, it should direct you to where you set the path. Is there a settings panel or file?

To answer the second half of your question, you won't be able to install inspect independently using conda, as inspect is a Python builtin module.

Chris Larson
  • 1,684
  • 1
  • 11
  • 19
  • then how do you install it? I get the same error when importing os module. it says `ImportError: No module named os` – Mona Jalal Jan 06 '17 at 01:15
  • Did you try this yet?: import sys; print('\n'.join(sys.path) ) – Chris Larson Jan 06 '17 at 21:03
  • And it shouldn't be something you install. It is a builtin module, which means that unless something is very non-standard and perhaps broken, it should simply be there. – Chris Larson Jan 06 '17 at 21:04