I install the package fairseq but it raises some errors as bellow. I'm using Anaconda Prompt to install on the base environment. Could anyone help to fix this problem?? Thanks so much!
(base) PS C:\WINDOWS\system32> pip install fairseq --user
Collecting fairseq
Using cached fairseq-0.10.1.tar.gz (924 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\johnn\Anaconda3\python.exe' 'C:\Users\johnn\Anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_for_build_wheel 'C:\Users\johnn\AppData\Local\Temp\tmpr4o1lvo4'
cwd: C:\Users\johnn\AppData\Local\Temp\pip-install-5efwp00y\fairseq_8f7b526c143c4da7b9cf30edcc3c3ab0
Complete output (31 lines):
Traceback (most recent call last):
File "setup.py", line 214, in <module>
do_setup(package_data)
File "setup.py", line 136, in do_setup
setup(
File "C:\Users\johnn\AppData\Local\Temp\pip-build-env-8dy_kf5o\overlay\Lib\site-packages\setuptools\__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "C:\Users\johnn\AppData\Local\Temp\pip-build-env-8dy_kf5o\overlay\Lib\site-packages\setuptools\__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "C:\Users\johnn\AppData\Local\Temp\pip-build-env-8dy_kf5o\overlay\Lib\site-packages\setuptools\build_meta.py", line 60, in fetch_build_eggs
raise SetupRequirementsError(specifier_list)
setuptools.build_meta.SetupRequirementsError: ['cython', 'numpy', 'setuptools>=18.0']
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\johnn\Anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 280, in <module>
main()
File "C:\Users\johnn\Anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\johnn\Anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\johnn\AppData\Local\Temp\pip-build-env-8dy_kf5o\overlay\Lib\site-packages\setuptools\build_meta.py", line 149, in get_requires_for_build_wheel
return self._get_build_requires(
File "C:\Users\johnn\AppData\Local\Temp\pip-build-env-8dy_kf5o\overlay\Lib\site-packages\setuptools\build_meta.py", line 130, in _get_build_requires
self.run_setup()
File "C:\Users\johnn\AppData\Local\Temp\pip-build-env-8dy_kf5o\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 217, in <module>
os.unlink(fairseq_examples)
PermissionError: [WinError 5] Access is denied: 'fairseq\\examples'
----------------------------------------
ERROR: Command errored out with exit status 1: 'C:\Users\johnn\Anaconda3\python.exe' 'C:\Users\johnn\Anaconda3\lib\site-packages\pip\_vendor\pep517\_in_process.py' get_requires_
my solution is below
git clone https://github.com/pytorch/fairseq
cd fairseq
activate env(that you created existed)
pip install --editable .
TL; DR: conda install fairseq --channel conda-forge
Conda Channels
Unfortunately, fairseq is not in the list of default conda channel. However, you can use
conda install fairseq --channel conda-forge
to install fairseq. The option --channel (-c for short) specifies the channel (it uses conda-forge in here) for conda to retrieve packages. You get a more detailed description in Conda channels | Conda Dos.
A similar example is when you follow the offical guide to install PyTorch with conda, it gives
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch
which means you install these 3 packages through channel pytorch.
About fairseq
If you simply would like to use fairseq rather than doing some specialized modifications (e.g. create an experimental neural network structure for research), conda install is enough. Otherwise, it is recommended to install as #yeonsook kwak said. The option --editable (-e for short) means you can directly do editions in this pulled repository.
conda install v.s. pip install
One advantage of doing conda install (instead of pip install) is that you can share the packages through all conda environments, which may save disk spaces. However, if you would like to install the same package but with different versions in different environments, you should use pip install.
A possible drawback for conda install is the package from external channels may not be the lastest comparing to those from PyPI/offical source.
Related
I'm currently struggling to install a python package in a virtual environment. The set-up is the following: I have an M1 mac and with it, I have the system python installations located in /usr/bin/python (v 2.7.18) and usr/bin/python3 (v 3.8.9). Since I don't really like messing with these, I have installed pyenv and pyenv-virtualenv over brew. I installed Python 3.10.1 and created a virtual environment, let's call it test. I also added the following lines to .zshrc
if command -v pyenv 1>/dev/null 2>&1; then
eval "$(pyenv init -)"
fi
alias brew='env PATH="${PATH//$(pyenv root)\/shims:/}" brew'
PATH=$(pyenv root)/shims:$PATH
(Most of this was done by following the explanations on the github page of pyenv).
I'm now trying to install some packages in test. numpy, scipy, etc worked perfectly but when I try to install PyQt5 with pip I get an error.
❯ pip install PyQt5
Collecting PyQt5
Using cached PyQt5-5.15.6.tar.gz (3.2 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
ERROR: Command errored out with exit status 1:
command: /Users/UserName/.pyenv/versions/3.10.1/envs/simpy/bin/python3.10 /Users/UserName/.pyenv/versions/3.10.1/envs/simpy/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/yk/q1gxptj56gj5n3jt8l48xj580000gn/T/tmp2ofsepfy
cwd: /private/var/folders/yk/q1gxptj56gj5n3jt8l48xj580000gn/T/pip-install-5rev2dd7/pyqt5_3892c9f35c2f41a186bcd36237d536d7
Complete output (29 lines):
Traceback (most recent call last):
File "/Users/UserName/.pyenv/versions/3.10.1/envs/simpy/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 156, in prepare_metadata_for_build_wheel
hook = backend.prepare_metadata_for_build_wheel
AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/UserName/.pyenv/versions/3.10.1/envs/simpy/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
main()
File "/Users/UserName/.pyenv/versions/3.10.1/envs/simpy/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/Users/UserName/.pyenv/versions/3.10.1/envs/simpy/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 160, in prepare_metadata_for_build_wheel
whl_basename = backend.build_wheel(metadata_directory, config_settings)
File "/private/var/folders/yk/q1gxptj56gj5n3jt8l48xj580000gn/T/pip-build-env-vyb7aqa6/overlay/lib/python3.10/site-packages/sipbuild/api.py", line 51, in build_wheel
project = AbstractProject.bootstrap('pep517')
File "/private/var/folders/yk/q1gxptj56gj5n3jt8l48xj580000gn/T/pip-build-env-vyb7aqa6/overlay/lib/python3.10/site-packages/sipbuild/abstract_project.py", line 83, in bootstrap
project.setup(pyproject, tool, tool_description)
File "/private/var/folders/yk/q1gxptj56gj5n3jt8l48xj580000gn/T/pip-build-env-vyb7aqa6/overlay/lib/python3.10/site-packages/sipbuild/project.py", line 587, in setup
self.apply_user_defaults(tool)
File "/private/var/folders/yk/q1gxptj56gj5n3jt8l48xj580000gn/T/pip-install-5rev2dd7/pyqt5_3892c9f35c2f41a186bcd36237d536d7/project.py", line 63, in apply_user_defaults
super().apply_user_defaults(tool)
File "/private/var/folders/yk/q1gxptj56gj5n3jt8l48xj580000gn/T/pip-build-env-vyb7aqa6/overlay/lib/python3.10/site-packages/pyqtbuild/project.py", line 70, in apply_user_defaults
super().apply_user_defaults(tool)
File "/private/var/folders/yk/q1gxptj56gj5n3jt8l48xj580000gn/T/pip-build-env-vyb7aqa6/overlay/lib/python3.10/site-packages/sipbuild/project.py", line 234, in apply_user_defaults
self.builder.apply_user_defaults(tool)
File "/private/var/folders/yk/q1gxptj56gj5n3jt8l48xj580000gn/T/pip-build-env-vyb7aqa6/overlay/lib/python3.10/site-packages/pyqtbuild/builder.py", line 67, in apply_user_defaults
raise PyProjectOptionException('qmake',
sipbuild.pyproject.PyProjectOptionException
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/3b/27/fd81188a35f37be9b3b4c2db1654d9439d1418823916fe702ac3658c9c41/PyQt5-5.15.6.tar.gz#sha256=80343bcab95ffba619f2ed2467fd828ffeb0a251ad7225be5fc06dcc333af452 (from https://pypi.org/simple/pyqt5/) (requires-python:>=3.6). Command errored out with exit status 1: /Users/UserName/.pyenv/versions/3.10.1/envs/simpy/bin/python3.10 /Users/UserName/.pyenv/versions/3.10.1/envs/simpy/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py prepare_metadata_for_build_wheel /var/folders/yk/q1gxptj56gj5n3jt8l48xj580000gn/T/tmp2ofsepfy Check the logs for full command output.
What exactly is going on here? Is this related to the m1 chip or the set-up of the virtual environment? How can I fix this?
On the suggestion of #pedro_bb7 I downgraded Python to 3.9.9 (since PyQt5 is not yet ready for Python 3.10.0) and also tried installing an older versions (5.14.1/2/, 5.15.0/1/2/3/4/5/6) of PyQt5 over the command
❯ pip install PyQt5==5.14.0
Collecting PyQt5==5.14.0
Using cached PyQt5-5.14.0.tar.gz (3.2 MB)
ERROR: PyQt5==5.14.0 from https://files.pythonhosted.org/packages/7c/5b/e760ec4f868cb77cee45b4554bf15d3fe6972176e89c4e3faac941213694/PyQt5-5.14.0.tar.gz#sha256=0145a6b7de15756366decb736c349a0cb510d706c83fda5b8cd9e0557bc1da72 has a pyproject.toml file that does not comply with PEP 518: 'build-system.requires' contains an invalid requirement: 'sip >=5.0.1 <6'
As you can see, still no luck...
Probably you need to upgrade pip to the latest, as suggested:
pip install --upgrade pip
https://stackoverflow.com/a/67606704/11381650
EDIT: it's not yet supported for Python 3.10 as you can see:
https://github.com/altendky/pyqt-tools/issues/98
and try different versions of PyQt, could you try 5.14.0 for Python 3.9?
https://stackoverflow.com/a/59797479/11381650
Method 1: Use rosetta terminal, install pyqt5
Youtube link to open rosetta terminal on Mac m1
https://www.youtube.com/watch?v=9W8rTTE1WEA
And then use pip to install under your virtual enviorment
pip install PyQt5
Method 2: Running under pyqt6
Like LemurPwned said in How can I run pyqt5 on my Mac with M1chip (ppc64el architecture)?
pyqt6 is now easily installable via pip on M1/M2 Macs
You can install that via
pip install PyQt6
I am trying to install a python library on macOS following through these instructions.
However I get an error every time I run this command : pip install --target=. Alfred-Workflow
And I always get this error for running it :
pip install --target=. Alfred-Workflow
Collecting Alfred-Workflow
Installing collected packages: Alfred-Workflow
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/usr/local/lib/python2.7/site-packages/pip/wheel.py", line 247, in move_wheel_files
prefix=prefix,
File "/usr/local/lib/python2.7/site-packages/pip/locations.py", line 153, in distutils_scheme
i.finalize_options()
File "/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 264, in finalize_options
"must supply either home or prefix/exec-prefix -- not both"
DistutilsOptionError: must supply either home or prefix/exec-prefix -- not both
I tried googling and searching for this but still can't figure it out. Thank you for any help.
This question answers that (I found it when googling for the last line of your error message).
First I also got the same error message as you did, but after doing this:
$ echo "[install]
prefix=" > ~/.pydistutils.cfg
It works:
$ pip install --target=. Alfred-Workflow
Collecting Alfred-Workflow
Installing collected packages: Alfred-Workflow
Successfully installed Alfred-Workflow-1.24
Important note: it breaks normal pip install commands, so you need to rm ~/.pydistutils.cfg afterward.
I have a similar error installing python modules using pip with -t(--target) option.
The pip log show the next message:
Complete output from command /usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-LvB_CW/xlrd/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-UNJizV-record/install-record.txt --single-version-externally-managed --compile --user --home=/tmp/tmphjBN23
and the next error:
can't combine user with prefix, exec_prefix/home, or install_(plat)base
Reading about alternate installation on python docs I see the next info
Note that the various alternate installation schemes are mutually exclusive: you can pass --user, or --home, or --prefix and --exec-prefix, or --install-base and --install-platbase, but you can’t mix from these groups.
So the command executed by pip has two mutually exclusive schemes --user and --home (i think it could be a bug on pip).
I use the --system option to avoid the error, eliminating the --user flag on the setup command.
pip install -t path_to_dir module_name --system
I don't known the aditional implications of this usage, but i think it's better than modifing the config file that messed up with normal installations.
PD: I use ubuntu 15.10 with pip 1.5.6
I have downloaded, built and installed the sample pypi project. The project is supposed to be used to give an insight to python packaging and is referenced in Python Packaging User Guide and Packaging and Distributing Projects. I am therefore confused to why on earth following their instructions on creating the package I have an error when uninstalling it.
As mentioned above I have used their sample project. If anyone can shed some light it would be appreciated.
Key notes: I am running Mac OSX, my installed python version is 3.5.1
Below are steps to reproduce the problem:
mkdir testdirectory
cd testdirectory/
pyvenv venv # Creating a virtual environment
source venv/bin/activate
git clone https://github.com/pypa/sampleproject.git # Getting sample project
cd sampleproject/
python setup.py build
python setup.py install # Installing on the virtual environment
pip list
peppercorn (0.5)
pip (7.1.2)
sample (1.2.0)
setuptools (18.2)
pip uninstall sample
Resulting in the following output:
Uninstalling sample-1.2.0:
/Users/steve/testdirectory/venv/bin/sample
/Users/steve/testdirectory/venv/lib/python3.5/site-packages/sample-1.2.0-py3.5.egg
Proceed (y/n)? y
Successfully uninstalled sample-1.2.0
Traceback (most recent call last):
File "/Users/steve/testdirectory/venv/bin/pip3", line 11, in <module>
sys.exit(main())
File "/Users/steve/testdirectory/venv/lib/python3.5/site-packages/pip/__init__.py", line 217, in main
return command.main(cmd_args)
File "/Users/steve/testdirectory/venv/lib/python3.5/site-packages/pip/basecommand.py", line 248, in main
pip_version_check(session)
File "/Users/steve/testdirectory/venv/lib/python3.5/site-packages/pip/utils/outdated.py", line 102, in pip_version_check
installed_version = get_installed_version("pip")
File "/Users/steve/testdirectory/venv/lib/python3.5/site-packages/pip/utils/__init__.py", line 858, in get_installed_version
working_set = pkg_resources.WorkingSet()
File "/Users/steve/testdirectory/venv/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 629, in __init__
self.add_entry(entry)
File "/Users/steve/testdirectory/venv/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 685, in add_entry
for dist in find_distributions(entry, True):
File "/Users/steve/testdirectory/venv/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2075, in find_eggs_in_zip
if metadata.has_metadata('PKG-INFO'):
File "/Users/steve/testdirectory/venv/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1605, in has_metadata
return self.egg_info and self._has(self._fn(self.egg_info, name))
File "/Users/steve/testdirectory/venv/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1963, in _has
return zip_path in self.zipinfo or zip_path in self._index()
File "/Users/steve/testdirectory/venv/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1843, in zipinfo
return self._zip_manifests.load(self.loader.archive)
File "/Users/steve/testdirectory/venv/lib/python3.5/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1783, in load
mtime = os.stat(path).st_mtime
FileNotFoundError: [Errno 2] No such file or directory: '/Users/steve/testdirectory/venv/lib/python3.5/site-packages/sample-1.2.0-py3.5.egg'
It appears that the package has uninstalled correctly however the error is still thrown.
This is documented:
$ pip help uninstall
Usage:
pip uninstall [options] <package> ...
pip uninstall [options] -r <requirements file> ...
Description:
Uninstall packages.
pip is able to uninstall most installed packages. Known exceptions are:
- Pure distutils packages installed with ``python setup.py install``, which
leave behind no metadata to determine what files were installed.
- Script wrappers installed by ``python setup.py develop``.
i.e. you are getting the error because you didn't use pip itself to install - you used setup.py and so pip doesn't know what was installed.
Install package not with python setup.py install but with pip install .
Then uninstalling will work without errors
I'm trying to create a Flask application to push to Heroku. When I try to create a virtualenv in the folder, I'm thrown this error:
photo-crawl › sudo virtualenv venv --distribute
Password:
New python executable in venv/bin/python
Installing distribute............................................................................................................................................................................................................................done.
Installing pip....
Complete output from command /Users/evansiegel/In...rawl/venv/bin/python -x /Users/evansiegel/In...env/bin/easy_install /Library/Python/2.7/...ort/pip-1.2.1.tar.gz:
/Users/evansiegel/Involvio/photo-crawl/venv/bin/python: can't open file '/Users/evansiegel/Involvio/photo-crawl/venv/bin/easy_install': [Errno 2] No such file or directory
----------------------------------------
...Installing pip...done.
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 9, in <module>
load_entry_point('virtualenv==1.8.4', 'console_scripts', 'virtualenv')()
File "/Library/Python/2.7/site-packages/virtualenv.py", line 964, in main
never_download=options.never_download)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 1076, in create_environment
install_pip(py_executable, search_dirs=search_dirs, never_download=never_download)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 667, in install_pip
filter_stdout=_filter_setup)
File "/Library/Python/2.7/site-packages/virtualenv.py", line 1042, in call_subprocess
% (cmd_desc, proc.returncode))
OSError: Command /Users/evansiegel/In...rawl/venv/bin/python -x /Users/evansiegel/In...env/bin/easy_install /Library/Python/2.7/...ort/pip-1.2.1.tar.gz failed with error code 2
It seems that for some reason virtualenv is not putting everything it should be putting into the venv/bin folder. Right now, only python and two aliases, python2 and python2.7 are in there.
Thanks!
I believe this is caused by a bug in older versions of virtualenv and/or pip. It looks like you're using virtualenv 1.8.4 and pip 1.2.1. Is it possible for you to upgrade to latest virtualenv and pip (currently virtualenv 1.9.1 and pip 1.3.1)?
This should do it, if you have install privileges:
pip install pip --upgrade
pip install virtualenv --upgrade
At that point running the same command (i.e. sudo virtualenv venv --distribute) should give you what you want.
I've just installed virtualenv (with Python 2.7.2) on my Mac, and I followed the guide here: http://virtualenvwrapper.readthedocs.org/en/latest/install.html
But I now get the following errors when I start up my shell every time:
stevedore.extension Could not load 'user_scripts': distribute
stevedore.extension distribute
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/stevedore/extension.py", line 62, in __init__
invoke_kwds,
File "/Library/Python/2.7/site-packages/stevedore/extension.py", line 74, in _load_one_plugin
plugin = ep.load()
File "/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1953, in load
if require: self.require(env, installer)
File "/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1966, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
DistributionNotFound: distribute
stevedore.extension Could not load 'project': distribute
stevedore.extension distribute
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/stevedore/extension.py", line 62, in __init__
invoke_kwds,
File "/Library/Python/2.7/site-packages/stevedore/extension.py", line 74, in _load_one_plugin
plugin = ep.load()
File "/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1953, in load
if require: self.require(env, installer)
File "/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1966, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
DistributionNotFound: distribute
stevedore.extension Could not load 'user_scripts': distribute
stevedore.extension distribute
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/stevedore/extension.py", line 62, in __init__
invoke_kwds,
File "/Library/Python/2.7/site-packages/stevedore/extension.py", line 74, in _load_one_plugin
plugin = ep.load()
File "/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1953, in load
if require: self.require(env, installer)
File "/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 1966, in require
working_set.resolve(self.dist.requires(self.extras),env,installer))
File "/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg/pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
DistributionNotFound: distribute
I don't know if it is affecting this problem, but I am using ZSH.
I tried to install stevedore through pip (sudo pip install stevedore), but I get the following error:
sudo sh setuptools-0.6c11-py2.7.egg
Processing setuptools-0.6c11-py2.7.egg
removing '/Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg' (and everything under it)
Copying setuptools-0.6c11-py2.7.egg to /Library/Python/2.7/site-packages
setuptools 0.6c11 is already the active version in easy-install.pth
Installing easy_install script to /usr/local/bin
Installing easy_install-2.7 script to /usr/local/bin
Installed /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg
Processing dependencies for setuptools==0.6c11
Finished processing dependencies for setuptools==0.6c11
TXSLs-MacBook-Pro% sudo pip install stevedore --upgrade
Requirement already up-to-date: stevedore in /Library/Python/2.7/site-packages
Downloading/unpacking distribute (from stevedore)
Running setup.py egg_info for package distribute
Installing collected packages: distribute
Running setup.py install for distribute
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg
Egg installation
Patching...
Renaming /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg into /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg.OLD.1348764450.4
Patched done.
Relaunching...
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'install' is not defined
Complete output from command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build/distribute/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-FAPgYH-record/install-record.txt --single-version-externally-managed:
Before install bootstrap.
Scanning installed packages
Setuptools installation detected at /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg
Egg installation
Patching...
Renaming /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg into /Library/Python/2.7/site-packages/setuptools-0.6c11-py2.7.egg.OLD.1348764450.4
Patched done.
Relaunching...
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'install' is not defined
----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/tmp/pip-build/distribute/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-FAPgYH-record/install-record.txt --single-version-externally-managed failed with error code 1 in /tmp/pip-build/distribute
Storing complete log in /Users/txsl/Library/Logs/pip.log
I manually installed setuptools as I couldn't install anything through pip without it.
What has gone wrong here and how can i fix it? The internet doesn't seem to have many cases of the error with stevedore. I feel rather stuck at the moment!
Many thanks!
I also use zsh and had a similar problem. I solved with this:
sudo pip install virtualenv virtualenvwrapper
I have the package python-pip installed in my Ubuntu 12.04.
Based on the error you are getting, it looks like you are having the following error: install glitch when using pip + virtualenv.
The issue is created when using the -distribute switch. The fix is (without re-running virtualenv with --distribute):
source bin/activate
wget http://python-distribute.org/distribute_setup.py
python distribute_setup.py
Had the same error message, upgrading the setuptools resolved the issue for me.
pip install --upgrade setuptools
I've found the information in this thread: http://blog.gmane.org/gmane.comp.python.virtualenv/month=20131001
I had the same problem after upgrading to OSX Mavericks. I fixed it by installing distribute globally.
sudo pip install distribute
I deactivated my current virtualenv first.