Resolving ipython error TypeError: _isdir() takes exactly 1 argument (0 given) and SETX on Vista

asked 2013-06-29 21:44:07 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi, I've just installed the SimpleCV1.3 superpack on Vista, and when trying to launch the shell by Shell.main() ipython (v0.10.2) crashes with TypeError: _isdir() takes exactly 1 argument (0 given).

After some googling I found out that the problem lies in an old version of path.py. I installed the latest version of path.py with pip, but it wasn't enough. Then I realized that ipython is bundled with its own path.py, and that's the one that needs to be updated. So I replaced C:\Python27\Lib\site-packages\IPython\external\path.py with C:\Python27\Lib\site-packages\path.py (which is updated by pip) and the error is resolved :)

It is possible that you don't even have to update path.py with pip in advance, I'm suspecting that the initial C:\Python27\Lib\site-packages\path.py that comes with the Python installation is already up to date, and it's enough to replace the older C:\Python27\Lib\site-packages\IPython\external\path.py . However, following the instructions I found on google I updated it right away so I can't be certain.

Another thing is that during the installation of the superpack the SETX commands in the .bat file failed to execute. That's ok, the installation continues fine and in the end it just takes to update the PATH and PYTHONPATH environmental variables manually by appending to them the directories C:\OpenCV2.3\opencv\build\x86\vc10\bin and C:\OpenCV2.3\opencv\build\python\2.7, respectively.

Working with environmental variables has always been a nuisance for me, so I would suggest a handy portable freeware called Rapid Environment Editor, which allows an easy gui interface for displaying and setting env. variables and helped me a lot. (Note: after modifying an environmental variable, don't forget to save it from within the program and then open a new console so the changes will take effect!)

Anyway, although it's not a question I thought to share this in case it's helpful to anyone :)

edit retag flag offensive close merge delete