Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Install with pipsi gives error #81

Open
astubbs opened this issue Nov 17, 2017 · 4 comments
Open

Install with pipsi gives error #81

astubbs opened this issue Nov 17, 2017 · 4 comments

Comments

@astubbs
Copy link

astubbs commented Nov 17, 2017

Running virtualenv with interpreter /Users/antony/.local/venvs/pipsi/bin/python2.7
Using real prefix '/usr/local/Cellar/python/2.7.13/Frameworks/Python.framework/Versions/2.7'
New python executable in /Users/antony/.local/venvs/terraform.py/bin/python2.7
Also creating executable in /Users/antony/.local/venvs/terraform.py/bin/python
Installing setuptools, pip, wheel...done.
Collecting terraform.py
  Could not find a version that satisfies the requirement terraform.py (from versions: )
No matching distribution found for terraform.py
Failed to pip install.  Aborting.
@shrivatsas
Copy link

Are you doing pipsi install terraform.py inside the directory, after git clone [email protected]:sean-abbott/terraform.py.git?

@astubbs
Copy link
Author

astubbs commented Dec 12, 2017

I imagine this is too much for you, but gawd I hate python's way of doing things:

antony at Antony-Stubbs-MBP-307844 in ~/r/p/rust-examples
↪ cd ../../projects/terraform.py/
antony at Antony-Stubbs-MBP-307844 in ~/r/p/terraform.py
↪ pipsi install terraform.py
fish: Unknown command 'pipsi'
antony at Antony-Stubbs-MBP-307844 in ~/r/p/terraform.py
↪ curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4130  100  4130    0     0  11229      0 --:--:-- --:--:-- --:--:-- 11222
Installing pipsi
You need to have virtualenv installed to bootstrap pipsi.
antony at Antony-Stubbs-MBP-307844 in ~/r/p/terraform.py
↪ cd ..
antony at Antony-Stubbs-MBP-307844 in ~/r/projects
↪ virtualenv
You must provide a DEST_DIR
Usage: virtualenv [OPTIONS] DEST_DIR

Options:
  --version             show program's version number and exit
  -h, --help            show this help message and exit
  -v, --verbose         Increase verbosity.
  -q, --quiet           Decrease verbosity.
  -p PYTHON_EXE, --python=PYTHON_EXE
                        The Python interpreter to use, e.g.,
                        --python=python2.5 will use the python2.5 interpreter
                        to create the new environment.  The default is the
                        interpreter that virtualenv was installed with
                        (/usr/local/opt/python/bin/python2.7)
  --clear               Clear out the non-root install and start from scratch.
  --no-site-packages    DEPRECATED. Retained only for backward compatibility.
                        Not having access to global site-packages is now the
                        default behavior.
  --system-site-packages
                        Give the virtual environment access to the global
                        site-packages.
  --always-copy         Always copy files rather than symlinking.
  --unzip-setuptools    Unzip Setuptools when installing it.
  --relocatable         Make an EXISTING virtualenv environment relocatable.
                        This fixes up scripts and makes all .pth files
                        relative.
  --no-setuptools       Do not install setuptools in the new virtualenv.
  --no-pip              Do not install pip in the new virtualenv.
  --no-wheel            Do not install wheel in the new virtualenv.
  --extra-search-dir=DIR
                        Directory to look for setuptools/pip distributions in.
                        This option can be used multiple times.
  --download            Download preinstalled packages from PyPI.
  --no-download, --never-download
                        Do not download preinstalled packages from PyPI.
  --prompt=PROMPT       Provides an alternative prompt prefix for this
                        environment.
  --setuptools          DEPRECATED. Retained only for backward compatibility.
                        This option has no effect.
  --distribute          DEPRECATED. Retained only for backward compatibility.
                        This option has no effect.
antony at Antony-Stubbs-MBP-307844 in ~/r/projects
↪ curl https://raw.githubusercontent.com/mitsuhiko/pipsi/master/get-pipsi.py | python3 - --src 'git+https://github.com/mitsuhiko/pipsi.git#egg=pipsi'

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  4130  100  4130    0     0  23973      0 --:--:-- --:--:-- --:--:-- 24011
Installing pipsi
Collecting pipsi from git+https://github.com/mitsuhiko/pipsi.git#egg=pipsi
  Cloning https://github.com/mitsuhiko/pipsi.git to /private/var/folders/9p/q2z1cccj13n5c1qbq5pf8s380000gp/T/pip-build-n9v9mk0_/pipsi
Collecting Click (from pipsi)
  Downloading click-6.7-py2.py3-none-any.whl (71kB)
    100% |████████████████████████████████| 71kB 1.7MB/s
Collecting virtualenv (from pipsi)
  Downloading virtualenv-15.1.0-py2.py3-none-any.whl (1.8MB)
    100% |████████████████████████████████| 1.8MB 620kB/s
Installing collected packages: Click, virtualenv, pipsi
  Running setup.py install for pipsi ... done
Successfully installed Click-6.7 pipsi-0.10.dev0 virtualenv-15.1.0
Traceback (most recent call last):
  File "<stdin>", line 170, in <module>
  File "<stdin>", line 148, in main
  File "<stdin>", line 93, in install_files
  File "<stdin>", line 69, in publish_script
FileExistsError: [Errno 17] File exists: '/Users/antony/.local/venvs/pipsi/bin/pipsi' -> '/Users/antony/.local/bin/pipsi'
antony at Antony-Stubbs-MBP-307844 in ~/r/projects
↪ pipsi
fish: Unknown command 'pipsi'
antony at Antony-Stubbs-MBP-307844 in ~/r/projects
↪ /Users/antony/.local/bin/pipsi
Usage: pipsi [OPTIONS] COMMAND [ARGS]...

  pipsi is a tool that uses virtualenv and pip to install shell tools that
  are separated from each other.

Options:
  --home PATH     The folder that contains the virtualenvs.
  --bin-dir PATH  The path where the scripts are symlinked to.
  --version       Show the version and exit.
  -h, --help      Show this message and exit.

Commands:
  install    Installs scripts from a Python package.
  list       Lists all scripts installed through pipsi.
  uninstall  Uninstalls scripts of a package.
  upgrade    Upgrades an already installed package.
antony at Antony-Stubbs-MBP-307844 in ~/r/projects
↪ /Users/antony/.local/bin/pipsi install terraform.py
Already using interpreter /Users/antony/.local/venvs/pipsi/bin/python3.6
Using base prefix '/usr/local/Cellar/python3/3.6.3/bin/../Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/antony/.local/venvs/ati/bin/python3.6
Also creating executable in /Users/antony/.local/venvs/ati/bin/python
ERROR: The executable /Users/antony/.local/venvs/ati/bin/python3.6 is not functioning
ERROR: It thinks sys.prefix is '/usr/local/Cellar/python3/3.6.3/Frameworks/Python.framework/Versions/3.6' (should be '/Users/antony/.local/venvs/ati')
ERROR: virtualenv is not compatible with this system or executable
Failed to create virtualenv.  Aborting.
antony at Antony-Stubbs-MBP-307844 in ~/r/projects
↪```

@sean-abbott
Copy link
Collaborator

This wasn't really tested with python3 when I was still working on it FYI, and ansible in general still doesn't really work well with python3: http://docs.ansible.com/ansible/latest/python_3_support.html

Unfortunately, I've changed jobs and no longer use this tool.

@danielporto
Copy link

A simple way to install it:
sudo pip install git+https://github.com/mantl/terraform.py.git
then, create a link to terraform.py into the path:
ln -s /usr/local/lib/python2.7/dist-packages/ati/terraform.py /usr/local/bin
done.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants