can't change python version for pyside on Mac - python

I'm attempting to setup PyCharm with a library provided for my introductory computer science course, but it appears that because of my version of python I am unable to install PySide, which is necessary for the library's imports. python --version outputs
Python 3.5.1 :: Anaconda 4.0.0 (x86_64)
when I try to install pyside with pip install pyside I received the following error:
Collecting PySide
Using cached PySide-1.2.4.tar.gz
Complete output from command python setup.py egg_info:
only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)]
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-iyhkri8c/PySide/
I've tried changing my version of python to 2.7, which looks like it would be supported, by installing pysel and running sudo pysel 2.7.12 but that gives me the following error:
Traceback (most recent call last):
File "//anaconda/bin/pysel", line 9, in <module>
load_entry_point('pythonselect==1.3', 'console_scripts', 'pysel')()
File "//anaconda/lib/python3.5/site-packages/pythonselect-1.3-py3.5.egg/pythonselect/pysel.py", line 287, in main
p.set_curr_python(sys.argv[1])
File "//anaconda/lib/python3.5/site-packages/pythonselect-1.3-py3.5.egg/pythonselect/pysel.py", line 212, in set_curr_python
% (pyver_dir, pyver))
pythonselect.pysel.Error: '/Library/Frameworks/Python.framework/Versions/2.7.12' does not exist: you must install Python 2.7.12
BUT I'm certain I did install python 2.7.12, contrary to this error message. I tried reinstalling as a sanity check and confirmed that it IS installed:
brew install python
Warning: python-2.7.12 already installed
I've been wrestling with this for a few days now and it's really got me confused. My thought is that Anaconda might be causing a problem but I'm not sure. Any thoughts?
Edit: I've attempted to install pyenv per your suggestions and encounter the following error. Again, it looks like Anaconda is causing some conflict.
~ ➤ pip install pyenv
Collecting pyenv
Downloading pyenv-20150113.1.tar.gz
Building wheels for collected packages: pyenv
Running setup.py bdist_wheel for pyenv ... error
Complete output from command //anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/tmpmwcdf4cipip-wheel- --python-tag cp35:
running bdist_wheel
running build
installing to build/bdist.macosx-10.5-x86_64/wheel
running install
Cloning into '/Users/johnlewis/.pyenv'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-doctor'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-installer'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-pip-rehash'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-update'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-virtualenv'...
Cloning into '/Users/johnlewis/.pyenv/plugins/pyenv-which-ext'...
WARNING: seems you still have not added 'pyenv' to the load path.
# Load pyenv automatically by adding
# the following to your profile:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
b''
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py", line 33, in <module>
cmdclass=dict(install=PyenvInstall),
File "//anaconda/lib/python3.5/distutils/core.py", line 148, in setup
dist.run_commands()
File "//anaconda/lib/python3.5/distutils/dist.py", line 955, in run_commands
self.run_command(cmd)
File "//anaconda/lib/python3.5/distutils/dist.py", line 974, in run_command
cmd_obj.run()
File "//anaconda/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 232, in run
self.distinfo_dir)
File "//anaconda/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 364, in egg2dist
raise ValueError(err)
ValueError: Egg metadata expected at build/bdist.macosx-10.5-x86_64/wheel/pyenv-20150113.1-py3.5.egg-info but not found
----------------------------------------
Failed building wheel for pyenv
Running setup.py clean for pyenv
Failed to build pyenv
Installing collected packages: pyenv
Running setup.py install for pyenv ... error
Complete output from command //anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-m94qw5kz-record/install-record.txt --single-version-externally-managed --compile:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
Command "//anaconda/bin/python -u -c "import setuptools, tokenize;__file__='/private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-m94qw5kz-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/vs/nq_fqyjn3hb_dhz35t4d18nh0000gn/T/pip-build-u_u2wk68/pyenv/
~ ➤

Related

can't install mysql==0.0.2 in python==3.8.1 environment

I can't install mysql==0.0.2. I am able to install mysql==0.0.3. The error looks like.
Seems to me setuptools error.
(venv) C:\Users\xyz\Envs\>pip install mysql==0.0.2
Collecting mysql==0.0.2
Using cached mysql-0.0.2.tar.gz (1.9 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\xyz\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\xyz\\AppData\\Local\\Temp\\pip-install-rygxsfpt\\mysql\\setup.py'"'"'; __file__='"'"'C:\\Users\\xyz\\AppData\\Local\\Temp\\pip-install-rygxsfpt\\mysql\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\xyz\AppData\Local\Temp\pip-install-rygxsfpt\mysql\pip-egg-info'
cwd: C:\Users\xyz\AppData\Local\Temp\pip-install-rygxsfpt\mysql\
Complete output (32 lines):
WARNING: `mysql` is a virtual package. Please use `%s` as a dependency directly.
running egg_info
creating C:\Users\xyzAppData\Local\Temp\pip-install-rygxsfpt\mysql\pip-egg-info\mysql.egg-info
writing C:\Users\xyzAppData\Local\Temp\pip-install-rygxsfpt\mysql\pip-egg-info\mysql.egg-info\PKG-INFO
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\xyz\AppData\Local\Temp\pip-install-rygxsfpt\mysql\setup.py", line 33, in <module>
setup(
File "c:\users\xyz\lib\site-packages\setuptools\__init__.py", line 87, in setup
return distutils.core.setup(**attrs)
File "c:\users\xyz\lib\site-packages\setuptools\_distutils\core.py", line 148, in setup
.....
.....
.....
lines = header.split('\n')
AttributeError: 'list' object has no attribute 'split'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
You shouldn't install mysql at all.
This package is a ‘virtual package’, which requires MySQL-python (Python 2) or mysqlclient (Python 3) to install. In effect, this means ‘pip install mysql’ will actually install MySQL-python.
Instead of depending on this package, please depend on the relevant package directly.
In a Python 3 world, use either
pip install mysqlclient (for MySQLdb), or
pip install mysql-connector-python (for mysql.connector).

Not able to install librosa

I am not able to install librosa in Ubuntu 18.04. I have tried the following commands, all are failed.
pip install librosa
python3.8 -m pip install librosa
sudo pip install librosa
pip install -u librosa
The below error I am getting:
Failed cleaning build dir for numba
Running setup.py bdist_wheel for resampy ... done
Stored in directory: /home/nageshas/.cache/pip/wheels/fa/c1/56/e0e12c6f7f3d2cdea9712b35136a2d40a7817c6210ec096485
Running setup.py bdist_wheel for llvmlite ... error
Complete output from command /usr/bin/python3.8 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zrky3kzn/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmphpnrxd05pip-wheel- --python-tag cp38:
running bdist_wheel
/usr/bin/python3.8 /tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 220, in <module>
main()
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 210, in main
main_posix('linux', '.so')
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 134, in main_posix
raise RuntimeError(msg) from None
RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
error: command '/usr/bin/python3.8' failed with exit status 1
----------------------------------------
Failed building wheel for llvmlite
Running setup.py clean for llvmlite
Successfully built librosa audioread resampy
Failed to build numba llvmlite
Installing collected packages: audioread, decorator, joblib, llvmlite, numpy, setuptools, numba, chardet, urllib3, idna, certifi, requests, pyparsing, packaging, appdirs, pooch, scipy, six, resampy, threadpoolctl, scikit-learn, pycparser, cffi, soundfile, librosa
Running setup.py install for llvmlite ... error
Complete output from command /usr/bin/python3.8 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zrky3kzn/llvmlite/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-f20fjedr-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
got version from file /tmp/pip-build-zrky3kzn/llvmlite/llvmlite/_version.py {'version': '0.36.0', 'full': 'e6bb8d137d922bec8beeb01a237254778759becd'}
running build_ext
/usr/bin/python3.8 /tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py
LLVM version... Traceback (most recent call last):
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 220, in <module>
main()
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 210, in main
main_posix('linux', '.so')
File "/tmp/pip-build-zrky3kzn/llvmlite/ffi/build.py", line 134, in main_posix
raise RuntimeError(msg) from None
RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
error: command '/usr/bin/python3.8' failed with exit status 1
I came across the same issues too.
There are several steps that helped me, but I cannot define the exact one. So I will list all:
First, update setuptools and wheel
python3 -m pip install --upgrade pip setuptools wheel
Second
python setup.py bdist_wheel
Try to install the previous version of librosa
pip install librosa==0.7.2
I hope the first two steps will help

Why can I not install pyenv?

Problem:
I am using python 2.7 on my Windows 10 computer.
When I run
pip install pyenv
I get the error shown below.
This is the only pip module that I have run into that I cannot install successfully. I'm not sure why this happens. Any ideas?
Error Message:
pip install pyenv
Collecting pyenv
Downloading pyenv-20150113.1.tar.gz
Building wheels for collected packages: pyenv
Running setup.py bdist_wheel for pyenv: started
Running setup.py bdist_wheel for pyenv: finished with status 'error'
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\u sers\\user\\appdata\\local\\temp\\pip-build-_6j2tq\\pyenv\\setup.py';f=getattr(tokenize, 'open', open )(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_w heel -d c:\users\user\appdata\local\temp\tmprb9n7epip-wheel- --python-tag cp27:
running bdist_wheel
running build
installing to build\bdist.win32\wheel
running install
Cloning into 'C:/Users/user/.pyenv'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-doctor'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-installer'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-pip-rehash'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-update'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-virtualenv'...
Cloning into 'C:/Users/user/.pyenv/plugins/pyenv-which-ext'...
WARNING: seems you still have not added 'pyenv' to the load path.
# Load pyenv automatically by adding
# the following to your profile:
export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "c:\users\user\appdata\local\temp\pip-build-_6j2tq\pyenv\setup.py", line 33, in <module>
cmdclass=dict(install=PyenvInstall),
File "c:\python27\lib\distutils\core.py", line 151, in setup
dist.run_commands()
File "c:\python27\lib\distutils\dist.py", line 953, in run_commands
self.run_command(cmd)
File "c:\python27\lib\distutils\dist.py", line 972, in run_command
cmd_obj.run()
File "c:\python27\lib\site-packages\wheel\bdist_wheel.py", line 257, in run
self.distinfo_dir)
File "c:\python27\lib\site-packages\wheel\bdist_wheel.py", line 393, in egg2dist
raise ValueError(err)
ValueError: Egg metadata expected at build\bdist.win32\wheel\.\pyenv-20150113.1-py2.7.egg-info but not found
----------------------------------------
Failed building wheel for pyenv
Running setup.py clean for pyenv
Failed to build pyenv
Installing collected packages: pyenv
Running setup.py install for pyenv: started
Running setup.py install for pyenv: finished with status 'error'
Complete output from command c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\ \users\\user\\appdata\\local\\temp\\pip-build-_6j2tq\\pyenv\\setup.py';f=getattr(tokenize, 'open', op en)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" insta ll --record c:\users\user\appdata\local\temp\pip-wjwco5-record\install-record.txt --single-version-ex ternally-managed --compile:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: option --single-version-externally-managed not recognized
----------------------------------------
Command "c:\python27\python.exe -u -c "import setuptools, tokenize;__file__='c:\\users\\user\\appdata \\local\\temp\\pip-build-_6j2tq\\pyenv\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.rea d().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record c:\users\mse dmon\appdata\local\temp\pip-wjwco5-record\install-record.txt --single-version-externally-managed --compi le" failed with error code 1 in c:\users\user\appdata\local\temp\pip-build-_6j2tq\pyenv\
The "pypi" page of pyvenv mentions:
The PyPi support is not tested by many users yet, so the direct way
ist still recommended if you want to play it safe.
The authors of the package recommend to use their dedicated installation script.

Unable to download a package using Pip : says Cython not installed when it is

I am trying to download the pyahocorasick package on my Windows 10 system using pip.
On my command line, I wrote-
pip install pyahocorasick
It gave the following output -
Collecting pyahocorasick
Using cached pyahocorasick-1.1.4.tar.bz2
Installing collected packages: pyahocorasick
Running setup.py install for pyahocorasick ... error
Complete output from command c:\python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Krishna\\AppData\\Local\\Temp\\pip-build-b7a1mq0t\\pyahocorasick\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Krishna\AppData\Local\Temp\pip-3iv3a5oc-record\install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
failed to import Cython: DLL load failed: %1 is not a valid Win32 application.
error: Cython does not appear to be installed
----------------------------------------
Command "c:\python34\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Krishna\\AppData\\Local\\Temp\\pip-build-b7a1mq0t\\pyahocorasick\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\Krishna\AppData\Local\Temp\pip-3iv3a5oc-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Krishna\AppData\Local\Temp\pip-build-b7a1mq0t\pyahocorasick\
Then I tried to see if Cython is in fact installed, so I wrote-
Cython version
and the output was -
Traceback (most recent call last):
File "C:\Python34\lib\runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python34\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Python34\Scripts\cython.exe\__main__.py", line 5, in <module>
File "C:\Python34\lib\site-packages\Cython\Compiler\Main.py", line 28, in <module>
from .Scanning import PyrexScanner, FileSourceDescriptor
ImportError: DLL load failed: %1 is not a valid Win32 application.
And finally I tried -
install Cython
And the output was -
Requirement already satisfied: Cython in c:\python34\lib\site-packages
So my question is - if Cython is already installed, why does installing the package pyahocorasick give the error - Cython does not appear to be installed? And how can I fix this problem?

Cannot install lxml 3.3.3 on OSX 10.9 with buildout

Have seen numerous related posts but not had any luck getting this to work. Log shows:
We have no distributions for lxml that satisfies 'lxml'.
Getting distribution for 'lxml'.
Running easy_install:
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python" "-c" "from setuptools.command.easy_install import main; main()" "-mZUNxd" "/Users/brad/Development/python/eggs/tmpLpoVC3" "-q" "/var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/tmpZx0t7aget_dist/lxml-3.3.3.tar.gz"
path=/Users/brad/Development/python/eggs/setuptools-0.7.2-py2.7.egg
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'bugtrack_url'
warnings.warn(msg)
In file included from src/lxml/lxml.etree.c:346:
/var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/easy_install-XSC3pm/lxml-3.3.3/src/lxml/includes/etree_defs.h:9:10: fatal error: 'libxml/xmlversion.h' file not found
#include "libxml/xmlversion.h"
^
1 error generated.
error: Setup script exited with error: command '/usr/bin/clang' failed with exit status 1Building lxml version 3.3.3.
Building without Cython.
ERROR: /bin/sh: xslt-config: command not found
** make sure the development packages of libxml2 and libxslt are installed **
Using build configuration of libxslt
An error occurred when trying to install lxml 3.3.3. Look above this message for any errors that were output by easy_install.
While:
Installing pydev.
Getting distribution for 'lxml'.
Error: Couldn't install: lxml 3.3.3
Tried answers from Cannot install Lxml on Mac os x 10.9.
xcode-select --install worked initially until an XCode upgrade to 10.5. Then hasn't worked since (even after retrying this line). Now I always get Can't install the software because it is not currently available from the Software Update server
Tried this STATIC_DEPS=true pip install lxml. It installed with error:
clang: error: unknown argument: '-mno-fused-madd' [-Wunused-command-line-argument-hard-error-in-future]
clang: note: this will be a hard error (cannot be downgraded to a warning) in the future
error: command 'cc' failed with exit status 1
----------------------------------------
Cleaning up...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/pip_build_brad/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/pip-4lSNM3-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/pip_build_brad/lxml
Storing debug log for failure in /Users/brad/Library/Logs/pip.log
That log file ends with:
Cleaning up...
Removing temporary dir /private/var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/pip_build_brad...
Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/pip_build_brad/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/pip-4lSNM3-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/pip_build_brad/lxml
Exception information:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/commands/install.py", line 283, in run
requirement_set.install(install_options, global_options, root=options.root_path)
File "/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 1435, in install
requirement.install(install_options, global_options, *args, **kwargs)
File "/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/req.py", line 706, in install
cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
File "/Library/Python/2.7/site-packages/pip-1.5.4-py2.7.egg/pip/util.py", line 697, in call_subprocess
% (command_desc, proc.returncode, cwd))
InstallationError: Command /usr/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/pip_build_brad/lxml/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/pip-4lSNM3-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/3c/mdys56lx2wbf9rjlmqy4nhy40000gn/T/pip_build_brad/lxml
Creating the symlink (https://stackoverflow.com/a/19549645/1399659) didn't help either.
Ideas appreciated, thanks
Ok, so coming back to this with fresh eyes, again, managed to resolve it.
The error clang: error: unknown argument: '-mno-fused-madd' during the pip install lxml above was the clincher. I'd spotted it and https://stackoverflow.com/a/22578811/1399659, but couldn't get another python version to work. Had tried MacPorts and Homebrew.
Finally a tip from https://stackoverflow.com/a/17439319/1399659 led me to removing macport's lxml and the system-installed pip. Then installing HomeBrew's python over fresh (with occasional forced linking), let me use it's installed pip to run bog-standard pip install lxml
Now running Homebrew's python 2.7.6 and pip, which was used to install lxml 3.3.3

Categories