0

new to coding and I think I've searched thoroughly for answers to this question, but the suggested solutions haven't been working for me. Apologies if this is a duplicate, though!

I'm trying to set up my computer according to these instructions, currently trying to get virtualenv up and running. However, pip doesn't seem to be working properly. I was able to use python -m pip as a workaround and installed virtualenv using: python -m pip install virtualenv

But the same workaround doesn't seem to work with virtualenvwrapper: python -m pip install virtualenvwrapper gives me this error:

Exception:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/commands/install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
    self.req_to_install.run_egg_info()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 412, in run_egg_info
    self.setup_py, self.name,
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip/req/req_install.py", line 387, in setup_py
    import setuptools  # noqa
  File "/Library/Python/2.7/site-packages/setuptools/__init__.py", line 12, in <module>
    import setuptools.version
  File "/Library/Python/2.7/site-packages/setuptools/version.py", line 1, in <module>
    import pkg_resources
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)

If I try running anything directly with a pip command, such as pip install virtualenvwrapper, I get this error:

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
    import packaging.requirements
  File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
    MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)

I have a mac running Sierra (10.12.4). Python version 2.7.6. Pip 9.0.1

Thoughts? Thank you!

  • What's your setuptools version? – Dean Fenster Apr 27 '17 at 18:19
  • I'd probably attack this problem totally differently. Start here https://brew.sh/ then `brew install python` Use that version rather than the system version. – jgritty Apr 27 '17 at 18:21
  • @DeanFenster I'm not sure inline`easy_install --version` produces the same error. I also tried the inline`which easy_install` method suggested [here] (http://stackoverflow.com/questions/1956646/determining-version-of-easy-install-setuptools) but there was no version listed in my file. – user7875185 Apr 28 '17 at 18:58
  • @user7875185 Run `python -c "import setuptools;print(setuptools.__version__)"` – Dean Fenster Apr 28 '17 at 19:02
  • @jgritty I tried installing homebrew, that seemed to work. That seemed to work to install virtualenv and virtualenvwrapper, but when I tried the next step from [the tutorial](http://newcoder.io/begin/setup-your-machine/) I was following I got: `-bash: /usr/local/bin/virtualenvwrapper.sh: No such file or directory` From googling I think my path is wrong? But I can't seem to figure out how to fix it :/ – user7875185 Apr 28 '17 at 19:03
  • @DeanFenster tried the command you suggested but I got the same error: `TypeError: __call__() takes exactly 2 arguments (1 given)` – user7875185 Apr 28 '17 at 19:04
  • @DeanFenster got the version via `pip list` I have setuptools 32.1.0 – user7875185 Apr 28 '17 at 19:45
  • Maybe you should create a new question for this, after using the brew method – jgritty Apr 28 '17 at 21:41
  • @jgritty thanks! started a new Q [here](http://stackoverflow.com/questions/43690784/error-message-for-virtualenvwrapper-installed-with-homebrew-on-mac-sierra) – user7875185 Apr 29 '17 at 01:00

0 Answers0