and in fact, "import setuptools" from the command line generates this:
ImportError Traceback (most recent call last)
<ipython-input-2-b6e7bae96787> in <module>()
----> 1 import setuptools
/Users/gpajer/anaconda/lib/python2.7/site-packages/setuptools/__init__.py in <module>()
9 from fnmatch import fnmatchcase
10
---> 11 import setuptools.version
12 from setuptools.extension import Extension
13 from setuptools.dist import Distribution, Feature, _get_unpatched
ImportError: No module named version
$ conda upgrade setuptools
Here's what "conda search setuptools" reports:
* 21.2.1 py27_0 defaults
What's up with that? Is this a conda issue? The package I'm installing is about three years old ... could that be a problem?
On Thu, May 26, 2016 at 8:56 AM, Gary Pajer <gary....@gmail.com> wrote:and in fact, "import setuptools" from the command line generates this:
ImportError Traceback (most recent call last)
<ipython-input-2-b6e7bae96787> in <module>()
----> 1 import setuptools
/Users/gpajer/anaconda/lib/python2.7/site-packages/setuptools/__init__.py in <module>()
9 from fnmatch import fnmatchcase
10
---> 11 import setuptools.version
12 from setuptools.extension import Extension
13 from setuptools.dist import Distribution, Feature, _get_unpatched
ImportError: No module named versionOK, that's weird.Did you install setuptools with conda? what version is it? you probably want the latest:$ conda upgrade setuptools
Here's what "conda search setuptools" reports:
* 21.2.1 py27_0 defaultsthat's almost the latest (I just got 21.2.2) -- but if you can't import setuptools, then something is hosed in your install. I"d try an upgrade and run it again.
I'm trying to install a third-party (i.e., no conda installation script exists AFAICT)
python setup.py build
fails with "No module named version"
and in fact, "import setuptools" from the command line generates this:
ImportError Traceback (most recent call last)
<ipython-input-2-b6e7bae96787> in <module>()
----> 1 import setuptools
/Users/gpajer/anaconda/lib/python2.7/site-packages/setuptools/__init__.py in <module>()
9 from fnmatch import fnmatchcase
10
---> 11 import setuptools.version
12 from setuptools.extension import Extension
13 from setuptools.dist import Distribution, Feature, _get_unpatched
ImportError: No module named version
On Thursday, May 26, 2016 at 11:56:45 AM UTC-4, GaryP wrote:I'm trying to install a third-party (i.e., no conda installation script exists AFAICT)
python setup.py build
fails with "No module named version"
and in fact, "import setuptools" from the command line generates this:
ImportError Traceback (most recent call last)
<ipython-input-2-b6e7bae96787> in <module>()
----> 1 import setuptools
/Users/gpajer/anaconda/lib/python2.7/site-packages/setuptools/__init__.py in <module>()
9 from fnmatch import fnmatchcase
10
---> 11 import setuptools.version
12 from setuptools.extension import Extension
13 from setuptools.dist import Distribution, Feature, _get_unpatched
ImportError: No module named versionAny idea if this is a conda issue or a setuptools issue? Google doesn't have much to say about this ... is there a place to ask the setuptools people?
Here's what "conda search setuptools" reports:
* 21.2.1 py27_0 defaults
What's up with that? Is this a conda issue? The package I'm installing is about three years old ... could that be a problem?
~-~-~
--Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+u...@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.
Setuptools is packages as an egg, ie. a zipfile whos path is added to sys.path, so there is no file "lib/python2.7/site-packages/setuptools/version.py".
Setuptools is probably getting imported from somewhere else.Have you looked at sys.path?
On Fri, May 27, 2016 at 12:04 PM, Ilan Schnell <il...@continuum.io> wrote:Setuptools is probably getting imported from somewhere else.Have you looked at sys.path?Thanks. Nothing in there except anaconda.I do note this: in .../site-packages I havesetuptools-0.6c11-py2.7.egg-infosetuptools-21.2.1-py2.7.eggCould that 0.6 egg-info file be the problem? I temporarily moved it, but then I got an error "No module named extern"
On Fri, May 27, 2016 at 12:33 PM, Gary Pajer <gary....@gmail.com> wrote:On Fri, May 27, 2016 at 12:04 PM, Ilan Schnell <il...@continuum.io> wrote:Setuptools is probably getting imported from somewhere else.Have you looked at sys.path?Thanks. Nothing in there except anaconda.I do note this: in .../site-packages I havesetuptools-0.6c11-py2.7.egg-infosetuptools-21.2.1-py2.7.eggCould that 0.6 egg-info file be the problem? I temporarily moved it, but then I got an error "No module named extern""No module named extern" is not reproducible. Don't know what I did there. No change when I remove that file. Same error "No module named version"
>>> import setuptools
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/gpajer/anaconda/lib/python2.7/site-packages/setuptools-21.2.1-py2.7.egg/setuptools/__init__.py", line 11, in <module>
File "/Users/gpajer/anaconda/lib/python2.7/site-packages/setuptools-21.2.1-py2.7.egg/setuptools/extern/__init__.py", line 1, in <module>
#
ImportError: No module named extern
- Ilan
- Ilan
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.
--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.
--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.
--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.
To post to this group, send email to anac...@continuum.io.
Visit this group at https://groups.google.com/a/continuum.io/group/anaconda/.
--
Anaconda Community Support Group Brought to you by Continuum Analytics
---
You received this message because you are subscribed to the Google Groups "Anaconda - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to anaconda+unsubscribe@continuum.io.
On Friday, May 27, 2016 at 12:43:52 PM UTC-4, GaryP wrote:On Fri, May 27, 2016 at 12:33 PM, Gary Pajer <gary....@gmail.com> wrote:On Fri, May 27, 2016 at 12:04 PM, Ilan Schnell <il...@continuum.io> wrote:Setuptools is probably getting imported from somewhere else.Have you looked at sys.path?Thanks. Nothing in there except anaconda.I do note this: in .../site-packages I havesetuptools-0.6c11-py2.7.egg-infosetuptools-21.2.1-py2.7.eggCould that 0.6 egg-info file be the problem? I temporarily moved it, but then I got an error "No module named extern""No module named extern" is not reproducible. Don't know what I did there. No change when I remove that file. Same error "No module named version"I wanted to try to remove setuptools and re-install it. I did "conda remove setuptools" and "conda uninstall setuptools" in case they are different. But I still have a setuptools directory and a setuptools egg. I then tried "conda clean --packages", but still that directory and egg remain. I renamed them to get them out of the way, then did "conda install setuptools"Result: (You can see for sure where it's looking)>>> import setuptools
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/gpajer/anaconda/lib/python2.7/site-packages/setuptools-21.2.1-py2.7.egg/setuptools/__init__.py", line 11, in <module>
File "/Users/gpajer/anaconda/lib/python2.7/site-packages/setuptools-21.2.1-py2.7.egg/setuptools/extern/__init__.py", line 1, in <module>
#
ImportError: No module named extern
I'd like to definitively remove all traces of setuptools and reinstall. I'm not convinced that what I've tried in that respect has actually removed everything. How can I make sure that all traces of setuptools is gone?
site-packages/easy-install.pth
I'm thinking that I might have to trash ~/anaconda and start fresh.
On 5/27/16 5:09 PM, Chris Barker wrote:
I'm thinking that I might have to trash ~/anaconda and start fresh.
Before you do that, I would suggest trying the following:
conda create -n ana_clean anaconda=4.0 python=2.7
source activate ana_clean
python setup.py build
and see if that rectifies the situation — this will allow you to try building the package in question in a “clean” conda environment that consists exclusively of the virgin Anaconda 4.0 packages (Python 2.7 variant).
If that doesn’t do it for you, read on …
That's a fine option -- the whole point of Anaconda is that it's easy to setup up a bunch of stuff -- so why mess around?
An option “just to test” would be to install Anaconda in another location, check your path to make sure you’re only referring to that location, and then see if the problem persists (in theory this should be identical to the first strategy I suggested, of creating a virgin Anaconda 4.0 environment)
Before deleting your
current Anaconda install, you can always do a conda list -e > root_env_snapshot.txt
in your root environment (and in any named environments) to
snapshot the list of packages and their versions. While it
doesn’t guarantee an exact reproduction (e.g. because you may
have used pip to install some things), but it should be pretty
good. Then after you’ve reinstalled Anaconda you can re-create
those with a conda install --file /path/to/environment/snapshot.txt
.
Ian