0

How can I resolve the error caused by installing by command: sudo pip install virtualenvwrapper?

Collecting virtualenvwrapper
Downloading virtualenvwrapper-4.7.2.tar.gz (90kB)
100% |████████████████████████████████| 92kB 18kB/s 
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/private/tmp/pip-build-Rhop8M/virtualenvwrapper/setup.py", line 7, in <module>
    pbr=True,
  File "/Applications/Canopy.app/appdata/canopy-1.6.2.3262.macosx-x86_64/Canopy.app/Contents/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/dist.py", line 268, in __init__
    self.fetch_build_eggs(attrs['setup_requires'])
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/dist.py", line 312, in fetch_build_eggs
    replace_conflicting=True,
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pkg_resources/__init__.py", line 846, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1091, in best_match
    return self.obtain(req, installer)
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1103, in obtain
    return installer(requirement)
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/dist.py", line 379, in fetch_build_egg
    return cmd.easy_install(req)
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 627, in easy_install
    not self.always_copy, self.local_index
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/package_index.py", line 601, in fetch_distribution
    self.find_packages(requirement)
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/package_index.py", line 438, in find_packages
    self.scan_url(self.index_url + requirement.unsafe_name+'/')
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/package_index.py", line 772, in scan_url
    self.process_url(url, True)
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/package_index.py", line 305, in process_url
    f = self.open_url(url, "Download error on %s: %%s -- Some packages may not be found!" % url)
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/package_index.py", line 711, in open_url
    return open_with_auth(url, self.opener)
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/package_index.py", line 905, in _socket_timeout
    return func(*args, **kwargs)
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/package_index.py", line 1003, in open_with_auth
    cred = PyPIConfig().find_credential(url)
  File "/Users/Extremeways/Library/Enthought/Canopy_64bit/User/lib/python2.7/site-packages/setuptools/package_index.py", line 959, in __init__
    self.read(rc)
  File "/Applications/Canopy.app/appdata/canopy-1.6.2.3262.macosx-x86_64/Canopy.app/Contents/lib/python2.7/ConfigParser.py", line 305, in read
    self._read(fp, filename)
  File "/Applications/Canopy.app/appdata/canopy-1.6.2.3262.macosx-x86_64/Canopy.app/Contents/lib/python2.7/ConfigParser.py", line 512, in _read
    raise MissingSectionHeaderError(fpname, lineno, line)
ConfigParser.MissingSectionHeaderError: File contains no section headers.
file: /Users/Extremeways/.pypirc, line: 1
'index-servers=\n'

----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-Rhop8M/virtualenvwrapper/
Jonathan March
  • 5,800
  • 2
  • 14
  • 16
Ibelin
  • 325
  • 2
  • 6
  • Where's your question? – OneCricketeer Feb 18 '17 at 12:50
  • @cricket_007 How to resolve the error caused by installing by command: sudo pip install virtualenvwrapper – Ibelin Feb 19 '17 at 13:03
  • Well, you shouldn't even be using sudo. http://stackoverflow.com/a/37104948/2308683 Your error seems to come from some `Canopy.app`, also, and not the system Python installation, which means you have Anaconda, so you'd generally use `conda`, and not `pip`, so you don't need virtualenv because `conda env` already does that. https://conda.io/docs/using/envs.html – OneCricketeer Feb 19 '17 at 15:46
  • @cricket_007 It seems this problem relates to the Canopy APP. I try to install the virtualenvwrapper in an isolated environment on the same Mac and it works. – Ibelin Feb 21 '17 at 07:03
  • Yup, and like I said, conda has its own environment management – OneCricketeer Feb 21 '17 at 12:48

0 Answers0