Installation Issue : Dangling symlink six and decorator
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-pip (Debian) |
Fix Released
|
Unknown
|
|||
python-pip (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
python-scipy (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
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/
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/
```
**Same goes for `decorator`.**
Changed in python-pip (Debian): | |
status: | Unknown → Fix Released |
scipy depends on python-six and python-decorator so it should have also been present in /usr/lib/ python- 2.7/dist- packages/ and found.
Are these files present on your system?
I cannot reproduce the issue even when I put a six into /usr/local
note newer versions of the scipy package only symlink decorator, six is now an embedded copy as it contains some patches.