Public bug reported:

This might be a user specific bug but this is what happened with me.

I installed `python-scipy` using apt-get on ubuntu. While using `scikit-
image` I had to import the module `scipy.lib.six` and then I got `No
module named six`. But I had already installed `six`. So, I did some
lookups and came to know that while installing, scipy creates a symlink
to the `six` module inside `scipy.lib`. And that's how `scipy.lib.six`
import works. But there's a catch. The symlink is created as
_`../../six.py`_.

Here the issue can get user-specific. For me, six was installed inside
`/usr/local/lib/python-2.7/dist-packages/` and scipy inside
`/usr/lib/python-2.7/dist-packages/`. Note the `/local`. So, scipy was
not able to find any `../../six.py`, that's what the issue is about.
Same goes for `scipy.lib.decorator`.

If this is considered as a bug, possible solutions which I can think of
is :

1. **Complete module import inside `scipy.lib.six`**

  Having a wildcard import of the six module.
  We can also have a try/catch block to raise a custom exception.

2. **Create a symlink after locating the module**

  ```python
  In [1]: import six

  In [2]: six.__file__
  Out[2]: '/usr/local/lib/python2.7/dist-packages/six.pyc'
  ```

**Same goes for `decorator`.**

** Affects: python-scipy (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1533634

Title:
  Installation Issue : Dangling symlink six and decorator

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-scipy/+bug/1533634/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to