Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

virtualenv error on os X

When I am trying to create a new environment using virtualenv, I am running into this error. I dont think I should run the command with sudo. Have tried reinstalling python using brew & then virtualenv but nothing to rescue.

manishs-MacBook-Pro:manish Manish$ virtualenv manish

New python executable in /Users/Manish/manish/manish/bin/python2.7
Not overwriting existing python script /Users/Manish/manish/manish/bin/python (you must use /Users/Manish/manish/manish/bin/python2.7)
Please make sure you remove any previous custom paths from your /Users/Manish/.pydistutils.cfg file.
Installing setuptools, pip, wheel...
  Complete output from command /Users/Manish/manish/manish/bin/python2.7 - setuptools pip wheel:
  Collecting setuptools
  Using cached setuptools-20.3.1-py2.py3-none-any.whl
Collecting pip
Collecting wheel
Installing collected packages: setuptools, pip, wheel
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_set.py", line 732, in install
    **kwargs
  File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_install.py", line 835, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/req/req_install.py", line 1030, in move_wheel_files
    isolated=self.isolated,
  File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/wheel.py", line 477, in move_wheel_files
    generated.extend(maker.make(spec))
  File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/_vendor/distlib/scripts.py", line 372, in make
    self._make_script(entry, filenames, options=options)
  File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/_vendor/distlib/scripts.py", line 276, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/_vendor/distlib/scripts.py", line 250, in _write_script
    self._fileop.write_binary_file(outname, script_bytes)
  File "/usr/local/lib/python2.7/site-packages/virtualenv_support/pip-8.1.1-py2.py3-none-any.whl/pip/_vendor/distlib/util.py", line 401, in write_binary_file
    with open(path, 'wb') as f:
IOError: [Errno 1] Operation not permitted: '/bin/easy_install'
----------------------------------------
...Installing setuptools, pip, wheel...done.
Traceback (most recent call last):
  File "/usr/local/bin/virtualenv", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 708, in main
    symlink=options.symlink)
  File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 941, in create_environment
    download=download,
  File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 897, in install_wheel
    call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
  File "/usr/local/lib/python2.7/site-packages/virtualenv.py", line 792, in call_subprocess
    % (cmd_desc, proc.returncode))
OSError: Command /Users/Manish/manish/manish/bin/python2.7 - setuptools pip wheel failed with error code 2
like image 684
manishpal Avatar asked Nov 28 '22 01:11

manishpal


1 Answers

I removed ~/.pydistutils.cfg & it worked

like image 159
manishpal Avatar answered Dec 08 '22 20:12

manishpal