1

Closed

Can't add path to search path list

description

I'm trying to include a library known to work with the environment I've set, but I just can't find an easy way of adding it to my search path list. I've been checking with "print sys.path" and nothing was added.

I'm using CPython x86 2.7.3, Microsoft Visual Studio 2012.2 and OpenCV 2.4.4.

My error message is simply "module not found".
Closed Mar 20 at 10:01 PM by Ptools

comments

dinov wrote Mar 16 at 6:01 PM

There's 2 ways to do this. In the project properties you can right click on the Search Paths node and choose "Add Folder to Search Path..." The other way is you can right click on the project and go to properties and go to the Debug tab and there's a Search Paths text box. You can enter the list of search paths there.

Either way though it'll require that you've created a new project - currently there's no way to set the search paths w/o a project.

luk51000 wrote Mar 16 at 7:08 PM

I did both of them. None worked. I suspect it has something to do with me trying out the Update 2 Preview. I just uninstalled everything and am reinstalling to remove it.

dinov wrote Mar 17 at 1:33 AM

Did you have to manually configure your interpreter in Tools->Options or did PTVS pick it up from the registry?

luk51000 wrote Mar 17 at 2:59 AM

I intentionally forbided cpython from modifying the system's path and registry, so I had to manually configure it.

dinov wrote Mar 18 at 7:45 PM

What did you set "Path Environment Variable" to in Tools->Options->Python Tools->Interpreter Options? It should be set to PYTHONPATH for CPython. This is the environment variable that we'll set which is how CPython will pick up the settings from the Search Path node or project properties page.

luk51000 wrote Mar 18 at 11:37 PM

I gave up on doing that. Uninstalled python, uninstalled PTVS 1.5, installed Enthought's Python distribuction, installed PTVS again. Now it works perfectly.

dinov wrote Mar 19 at 12:45 AM

Great, glad you got it working! Sorry for the delayed responses, PyCon was keeping us busy!