Got a problem with Viscosity or need help? Ask here!
I'm trying to connect to my VPN from Lion 10.7.3 in the latest version of Viscosity but I'm getting an error.
Here's the output from the Viscosity log:
Mar 23 10:52:12: Viscosity 1.3.5 (1051)
Mar 23 10:52:12: Checking reachability status of connection...
Mar 23 10:52:12: Connection is reachable. Starting connection attempt.
Traceback (most recent call last):
File "ViscosityHelper.py", line 8, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC/AppKit/__init__.py", line 8, in <module>
import objc as _objc
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC/objc/__init__.py", line 26, in <module>
from _bridgesupport import *
File "/System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python/PyObjC/objc/_bridgesupport.py", line 9, in <module>
ImportError: No module named pkg_resources
The OpenVPN subsystem could not be started. Please check the following:
- Check for any error messages above this notification.
- Make sure Viscosity is not running under a File Vault protected location (put Viscosity in the Applications folder).
- Make sure the configuration is valid. Check the connection settings for the connection using Viscosity and make sure all settings are correct.
It looks like it looking for the pkg_resources module, which I do see in /System/Library/Frameworks/Python.framework/Versions/2.5/Extras/lib/python directory. Am I missing something?
Any help would be great. Thanks!
A custom version of Python is probably overriding the system's version. Have you installed Python from MacPorts, or from the Python website, that can be overriding the system install?
If you fire up the Terminal (/Applications/Utilities/Terminal.app) and type "python", what output do you get?
Thanks for your reply.
Here is the output from terminal:
HChestnut-MBA13:objc helena.chestnut$ which python
HChestnut-MBA13:objc helena.chestnut$ python --version
HChestnut-MBA13:objc helena.chestnut$ python
Python 2.7.2 (default, Mar 23 2012, 16:33:01)
[GCC 4.2.1 Compatible Apple Clang 3.1 (tags/Apple/clang-318.0.54)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
I installed Python months ago using Homebrew - this is the first time it's conflicted with Viscosity.
If there a path I can change it to that will help me resolve this issue?
Well Viscosity uses Python 2.5 for backwards compatibility with Mac OS 10.5. By default it will try using what /usr/bin/python2.5 points to, and fall back to /usr/bin/python. In most instances where Python issues arise, it has been due to these soft links being changed to point to a custom install.
You could try entering "ls -la /usr/bin/python*" into the Terminal to see what these point to. The correct relevant entry for version 2.5 should look something like:
lrwxr-xr-x 1 root wheel 75 30 Dec 16:45 /usr/bin/python2.5 -> ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5
Of course, it's entirely possible that the correct version of Python is indeed being used, and your system bundled version of Python and its libraries has become corrupted somehow. The easiest way to fix this would be to copy across the Python.framework folder from another working Mac, or from the system discs.
Thanks for this info James.
It looks like there are several instances of Python.framework libraries. from 2.3 to 2.7.
My current python path is lrwxr-xr-x 1 root wheel 21 Mar 16 18:08 /usr/bin/python -> /usr/local/bin/python
Should I change this?
There are no system discs that come with OS X Lion - Is there another solution other than copying the Python.framework from another Mac? I will try this solution, then will get back to you.
Thanks for your assistance.
I just checked to see if /usr/bin/python2.5 existed and it doesn't.
I do see /usr/lib/python2.5 which I then copied to /usr/bin/. So now there's a /usr/bin/python2.5.
I tried to connect again but I still got the same error.
Try running the following commands in the Terminal, and then try and start Viscosity.
Yes, That did it!
Thanks so very much! You're the best.
I blew away the system version of python -- 2.5 -- because it was interferring with new work I was doing -- and now viscosity is dead and I am up a creek so to speak. Can you help?
Viscosity relies on a number of frameworks that ship with the system copy of Python - you'll need to restore the Python frameworks from either your system discs, or copied over from another Mac (they are located at /System/Frameworks/Python.framework).
If you wish to have a custom copy of Python run by default it usually isn't necessary to remove the system version - simply adjust the Python shortcuts (in /usr/bin) and environment variables (if necessary) to point to your custom version. Viscosity will still be able to run using the system version.
Who is online
Users browsing this forum: No registered users and 2 guests