I know there are a few questions on here and around the internet regarding parallel python builds using setuptools. Yet, none provide a solution. It's also worth mentioning that most I come across are 5+ years old.
It seems that I can achieve my desired parallelization during install through:
>> python setup.py build -j 4
>> python setup.py install
But this doesn't work for editable installations, i.e. for development. The editable install requires calling python setup.py develop instead of the above 2 commands. However, there is no -j flag for develop. If I try to call it after the build, for example,
>> python setup.py build -j 4
>> python setup.py develop
I get the error:
running develop
running egg_info
creating My_Package.egg-info
writing My_Package.egg-info/PKG-INFO
writing dependency_links to My_Package.egg-info/dependency_links.txt
writing top-level names to My_Package.egg-info/top_level.txt
writing manifest file 'My_Package.egg-info/SOURCES.txt'
reading manifest file 'My_Package.egg-info/SOURCES.txt'
writing manifest file 'My_Package.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-x86_64-3.7_my_package_ext/_enums.cpython-37m-x86_64-linux-gnu.so _my_package_ext
error: could not create _my_package_ext/_enums.cpython-37m-x86_64-linux-gnu.so': No such file or directory
Additionally, it is recommended to use pip install -e . --user instead of python setup.py develop anyway. If I try to call that after the parallel build, I get:
>> python setup.py build -j 4
>> pip install -e . --user
Running setup.py (path:/package/setup.py) egg_info for package from file:///package
Running command python setup.py egg_info
running egg_info
writing My-Package.egg-info/PKG-INFO
writing dependency_links to My-Package.egg-info/dependency_links.txt
writing top-level names to My-Package.egg-info/top_level.txt
reading manifest file 'My-Package.egg-info/SOURCES.txt'
writing manifest file 'My-Package.egg-info/SOURCES.txt'
Source in /package has version 0.0, which satisfies requirement My-Package==0.0 from file:///package
Installing collected packages: My-Package
Running setup.py develop for My-Package
Running command /usr/bin/python3 -c "import setuptools, tokenize;__file__='/package/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps --user --prefix=
running develop
running egg_info
writing My-Package.egg-info/PKG-INFO
writing dependency_links to My-Package.egg-info/dependency_links.txt
writing top-level names to My-Package.egg-info/top_level.txt
reading manifest file 'My-Package.egg-info/SOURCES.txt'
writing manifest file 'My-Package.egg-info/SOURCES.txt'
running build_ext
copying build/lib.linux-x86_64-3.6/_my_package_ext/_enums.cpython-36m-x86_64-linux-gnu.so -> _my_package_ext
error: could not create '_my_package_ext/_enums.cpython-36m-x86_64-linux-gnu.so': No such file or directory
Cleaning up...
Command "/usr/bin/python3 -c "import setuptools, tokenize;__file__='/package/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" develop --no-deps --user --prefix=" failed with error code 1 in /package/
Does anyone know of a good way to get the parallelized build in an editable install? Ideally, it would be though the pip install -e ... formulations, but really anything would be better than nothing.
Related
I cannot install psycopg2 on my M1 Mac and I used pip3.
When I tried to install with pip3 install psycopg2 The output like that:
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/python#3.9/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-install-9wiqe2nr/psycopg2_147a5ae8fd5a47079480274f4225edbf/setup.py'"'"'; __file__='"'"'/private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-install-9wiqe2nr/psycopg2_147a5ae8fd5a47079480274f4225edbf/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 /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-06hnnl2t
cwd: /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-install-9wiqe2nr/psycopg2_147a5ae8fd5a47079480274f4225edbf/
Complete output (23 lines):
running egg_info
creating /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-06hnnl2t/psycopg2.egg-info
writing /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-06hnnl2t/psycopg2.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-06hnnl2t/psycopg2.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-06hnnl2t/psycopg2.egg-info/top_level.txt
writing manifest file '/private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-06hnnl2t/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/fd/ae/98cb7a0cbb1d748ee547b058b14604bd0e9bf285a8e0cc5d148f8a8a952e/psycopg2-2.8.6.tar.gz#sha256=fb23f6c71107c37fd667cb4ea363ddeb936b348bbd6449278eb92c189699f543 (from https://pypi.org/simple/psycopg2/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached psycopg2-2.8.5.tar.gz (380 kB)
ERROR: Command errored out with exit status 1:
command: /opt/homebrew/opt/python#3.9/bin/python3.9 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-install-9wiqe2nr/psycopg2_97efcf6747c249769acdc8430ba4238f/setup.py'"'"'; __file__='"'"'/private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-install-9wiqe2nr/psycopg2_97efcf6747c249769acdc8430ba4238f/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 /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r
cwd: /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-install-9wiqe2nr/psycopg2_97efcf6747c249769acdc8430ba4238f/
Complete output (23 lines):
running egg_info
creating /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r/psycopg2.egg-info
writing /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r/psycopg2.egg-info/PKG-INFO
writing dependency_links to /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r/psycopg2.egg-info/dependency_links.txt
writing top-level names to /private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r/psycopg2.egg-info/top_level.txt
writing manifest file '/private/var/folders/m5/vhnyyjg16gd352x6wdhpjysh0000gn/T/pip-pip-egg-info-ap2am61r/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
==============================================================================
Its beginning of the error, After that its tried to install each previous version of Psycopg
==============================================================================
Also, I tried to install with source code with :
git clone https://github.com/psycopg/psycopg2.git
cd psycopg2
python3 setup.py build
Its return as error like that:
running build
running build_py
running build_ext
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
Also
python3 setup.py build
return the same error as python3 setup.py build
How can I install it?
try this:
brew install libpq --build-from-source
brew install openssl
export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib -L/opt/homebrew/opt/libpq/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include -I/opt/homebrew/opt/libpq/include"
pip3 install psycopg2
Before reverting to any of the older answers, I would recommend trying the following:
Install Postgres using brew install postgres, then pip3 install psycopg2.
Worked on Mac M1, Monterey, Python 3.9.
Thanks to Kori Vernon.
Thanks to active development, now there is a new release of psycopg2 as well as psycopg2-binary which is compatible with M1 devices.
Ver. 2.9.1 works smooth. Tried and tested
Reference - https://github.com/psycopg/psycopg2/issues/1200
Following this steps solved my problem:
❯ brew install postgresql#14
# If you open a new terminal tab you will see that pg_config is available
❯ export CPPFLAGS="-I/opt/homebrew/opt/openssl#1.1/include"
❯ export LDFLAGS="-L/opt/homebrew/opt/openssl#1.1/lib -L${HOME}/.pyenv/versions/3.10.7/lib" # use your current python version
❯ python -V
Python 3.10.7 # make sure it matches the same above configuration
❯ pip install psycopg2-binary==2.8.5
This question already has answers here:
Error: pg_config executable not found when installing psycopg2 on Alpine in Docker
(5 answers)
Closed 2 years ago.
This is the error I get after I installed
RUN pip install -r requirements.txt
RROR: Service 'web' failed to build: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
➜ django-docker pip install psycopg2
Defaulting to user installation because normal site-packages is not writeable
Collecting psycopg2
Using cached psycopg2-2.8.6.tar.gz (383 kB)
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3.6 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7xuxd9cm/psycopg2/setup.py'"'"'; file='"'"'/tmp/pip-install-7xuxd9cm/psycopg2/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 /tmp/pip-pip-egg-info-uon18vv4
cwd: /tmp/pip-install-7xuxd9cm/psycopg2/
Complete output (23 lines):
running egg_info
creating /tmp/pip-pip-egg-info-uon18vv4/psycopg2.egg-info
writing /tmp/pip-pip-egg-info-uon18vv4/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-pip-egg-info-uon18vv4/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-pip-egg-info-uon18vv4/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-pip-egg-info-uon18vv4/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<https://www.psycopg.org/docs/install.html>).
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
The error could be caused by the wrong operator on psycopy2-binary>==2.8 which according to pip docs should be >= and not >==
This might cause an error in parsing the requirements file.
I have venv activated using conda
$source activate /home/sim/anaconda3/envs/myenv
I am in venv (myenv) sim#ma-Vostro-15-3568:~/flask/venv$
python3 -m pip install psycopg2
i have tried pip3 also
python --version is 3.6
Error is below
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Command errored out with exit status 1:
command: /home/mak/anaconda3/envs/myenv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-7ql73mks/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-7ql73mks/psycopg2/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 /tmp/pip-install-7ql73mks/psycopg2/pip-egg-info
cwd: /tmp/pip-install-7ql73mks/psycopg2/
Complete output (23 lines):
running egg_info
creating /tmp/pip-install-7ql73mks/psycopg2/pip-egg-info/psycopg2.egg-info
writing /tmp/pip-install-7ql73mks/psycopg2/pip-egg-info/psycopg2.egg-info/PKG-INFO
writing dependency_links to /tmp/pip-install-7ql73mks/psycopg2/pip-egg-info/psycopg2.egg-info/dependency_links.txt
writing top-level names to /tmp/pip-install-7ql73mks/psycopg2/pip-egg-info/psycopg2.egg-info/top_level.txt
writing manifest file '/tmp/pip-install-7ql73mks/psycopg2/pip-egg-info/psycopg2.egg-info/SOURCES.txt'
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
For further information please check the 'doc/src/install.rst' file (also at
<http://initd.org/psycopg/docs/install.html>).
According to error message, you can either 1. specify path, or 2. install psycopg2-binary using the command: pip3 install psycopg2-binary
Try this
sudo apt install libpq-dev python3-dev
Get help from LINK
Vpython versions are not available from their website, but according to https://groups.google.com/forum/#!topic/vpython-users/AmIZF2v4Wkc, "pip install vpython" should work for any version of Python.
I entered "pip install vpython" into the windows command prompt. After several minutes of downloading, pip gave me the following error:
Running setup.py install for vpnotebook ... error
Complete output from command c:\users\zachary\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Zachary\\AppData\\Local\\Temp\\pip-build-dx_wvbg0\\vpnotebook\\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\Zachary\AppData\Local\Temp\pip-3q5u2e2l-record\install-record.txt --single-version-externally-managed --compile:
ImportError install_kernel_spec
c:\users\zachary\appdata\local\programs\python\python36-32\lib\site-packages\setuptools\dist.py:331: UserWarning: Normalizing '0.1.03' to '0.1.3'
normalized_version,
running install
Installing Python module...
running build
running build_py
creating build
creating build\lib
creating build\lib\vpnotebook
copying vpnotebook\__init__.py -> build\lib\vpnotebook
creating build\lib\vpnotebook\data
copying vpnotebook\data\kernel.json -> build\lib\vpnotebook\data
running install_lib
creating c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook
creating c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook\data
copying build\lib\vpnotebook\data\kernel.json -> c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook\data
copying build\lib\vpnotebook\__init__.py -> c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook
byte-compiling c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook\__init__.py to __init__.cpython-36.pyc
running install_egg_info
running egg_info
writing vpnotebook.egg-info\PKG-INFO
writing dependency_links to vpnotebook.egg-info\dependency_links.txt
writing top-level names to vpnotebook.egg-info\top_level.txt
warning: manifest_maker: standard file '-c' not found
reading manifest file 'vpnotebook.egg-info\SOURCES.txt'
writing manifest file 'vpnotebook.egg-info\SOURCES.txt'
Copying vpnotebook.egg-info to c:\users\zachary\appdata\local\programs\python\python36-32\Lib\site-packages\vpnotebook-0.1.3-py3.6.egg-info
running install_scripts
writing list of installed files to 'C:\Users\Zachary\AppData\Local\Temp\pip-3q5u2e2l-record\install-record.txt'
Installing custom kernel ...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\setup.py", line 30, in <module>
package_data={'vpnotebook': ['data/kernel.json']},
File "c:\users\zachary\appdata\local\programs\python\python36-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\zachary\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 955, in run_commands
self.run_command(cmd)
File "c:\users\zachary\appdata\local\programs\python\python36-32\lib\distutils\dist.py", line 974, in run_command
cmd_obj.run()
File "C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\vpnotebook\__init__.py", line 72, in run
run_kernel_install(False)
File "C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\vpnotebook\__init__.py", line 63, in run_kernel_install
install_kernel_spec(source_dir, kernel_name='vpython', user=user)
NameError: free variable 'install_kernel_spec' referenced before assignment in enclosing scope
----------------------------------------
Command "c:\users\zachary\appdata\local\programs\python\python36-32\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\Zachary\\AppData\\Local\\Temp\\pip-build-dx_wvbg0\\vpnotebook\\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\Zachary\AppData\Local\Temp\pip-3q5u2e2l-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\Zachary\AppData\Local\Temp\pip-build-dx_wvbg0\vpnotebook\
The immediate fix is to install jupyter before you install vpnotebook:
pip install jupyter
Thanks for reporting this; in the future issues posted at either the location #user1114907 indicated or at the main github repo: https://github.com/BruceSherwood/vpython-jupyter/issues
This appears to be a bug in vpnotebook, upon which vpython depends. Trying to install vpnotebook in both Python 2.7 and 3.5 fails with the same error, which appears to have been caused by the package's authors not even using a basic linter. I would suggest reporting this to said authors, but there are no contact details, repositories, or project websites listed on the package's PyPI page.
If your python version is greater than 2.7.9, skip to step 3
Install python version > 2.7.9 [2.7.14 is the latest]
Download latest version of python
extract the archive
./configure
make
make install
Download and re-install pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
Install jupyter First
sudo pip install jupyter
Then, install vpython
sudo pip install vpython
Post-installation Screenshot
I have a system-level installation of Python 3.3.3, and I want to set up an installation in user space at /usr/local/python33 as part of a multi-version virtualenv-type setup. I made the directory, and I have attempted to use both easy_install and pip (as easy_install-3.3 and pip-3.3 from the system-level install) to put a copy of Python 3.3.3 there. No joy. The logs from both attempts are shown below. I thought this was supposed to be straightforward, but my confidence if flagging.
EASY_INSTALL
easy_install-3.3 --install-dir="/usr/local/python33" python==3.3.3
Creating /usr/local/python33/site.py
Searching for python==3.3.3
Reading https://pypi.python.org/simple/python/
Reading http://www.python.org
Reading http://www.python.org/2.3
Reading http://www.python.org/2.4
Reading http://www.python.org/2.4.1
Reading http://www.python.org/2.5
Reading http://www.python.org/download/
Best match: Python 3.3.3
Downloading http://www.python.org/ftp/python/3.3.3/Python-3.3.3.tgz
Processing Python-3.3.3.tgz
Writing /var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/easy_install-3cjpwy/Python-3.3.3/setup.cfg
Running Python-3.3.3/setup.py -q bdist_egg --dist-dir /var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/easy_install-3cjpwy/Python-3.3.3/egg-dist-tmp-3me0es
error: Setup script exited with error: Modules/Setup: No such file or directory
PIP
pip-3.3 install --target /usr/local/python33 python==3.3.3
You are installing a potentially insecure and unverifiable file. Future versions of pip will default to disallowing insecure files.
Downloading from URL http://www.python.org/ftp/python/3.3.3/Python-3.3.3.tgz (from http://www.python.org/download/)
Running setup.py egg_info for package python
running egg_info
creating pip-egg-info/Python.egg-info
writing dependency_links to pip-egg-info/Python.egg-info/dependency_links.txt
writing top-level names to pip-egg-info/Python.egg-info/top_level.txt
writing pip-egg-info/Python.egg-info/PKG-INFO
writing manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
warning: manifest_maker: standard file '-c' not found
reading manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
writing manifest file 'pip-egg-info/Python.egg-info/SOURCES.txt'
Source in /private/var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/pip_build_tipton/python has version 3.3.3, which satisfies requirement python==3.3.3
Installing collected packages: python
Running setup.py install for python
Running command /Library/Frameworks/Python.framework/Versions/3.3/bin/python3.3 -c "import setuptools;__file__='/private/var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/pip_build_tipton/python/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/pip-x_pk9r-record/install-record.txt --single-version-externally-managed --home=/var/folders/l0/14nc8kh968l6kqp86s5ddxph0000gn/T/tmpf4gi0e
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
Both easy_install and pip are for installing Python packages, not for installing Python itself.
How you install Python depends on your operating system. For Unices you typically run the standard configure; make; make install.