Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Updates pip installation command #286

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
5 participants
@captn3m0
Copy link

commented May 6, 2019

See #188 for more details

@googlebot

This comment has been minimized.

Copy link

commented May 6, 2019

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@ramaro

This comment has been minimized.

Copy link
Collaborator

commented May 6, 2019

Hey @captn3m0, I'm confused of what value --only-binary provides here?

@captn3m0 captn3m0 force-pushed the captn3m0:pip-install-binary branch from 2f5a5ee to 9d749be May 6, 2019

@googlebot

This comment has been minimized.

Copy link

commented May 6, 2019

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@captn3m0

This comment has been minimized.

Copy link
Author

commented May 6, 2019

It forces the wheel version to be installed, instead of the source version. The source version fails installation because of the missing requirements.txt file.

@captn3m0

This comment has been minimized.

Copy link
Author

commented May 6, 2019

See this log for a sample installation in a fresh virtualenv that breaks:

mkvirtualenv ktest
Using base prefix '/usr'
New python executable in /home/nemo/.virtualenvs/ktest/bin/python
Installing setuptools, pip, wheel...
done.
virtualenvwrapper.user_scripts creating /home/nemo/.virtualenvs/ktest/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/nemo/.virtualenvs/ktest/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/nemo/.virtualenvs/ktest/bin/preactivate
virtualenvwrapper.user_scripts creating /home/nemo/.virtualenvs/ktest/bin/postactivate
virtualenvwrapper.user_scripts creating /home/nemo/.virtualenvs/ktest/bin/get_env_details

pip install kapitan
Collecting kapitan
  Using cached https://files.pythonhosted.org/packages/ca/df/6e4c4e9dc1c905aa9a3297276297565a5c5044c441012949235979913913/kapitan-0.23.0.tar.gz
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-mfcvso8j/kapitan/setup.py", line 55, in <module>
        pkgs, new_links = install_deps()
      File "/tmp/pip-install-mfcvso8j/kapitan/setup.py", line 41, in install_deps
        with open('requirements.txt', 'r') as f:
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-mfcvso8j/kapitan/


pip install --no-cache kapitan

Collecting kapitan
  Downloading https://files.pythonhosted.org/packages/ca/df/6e4c4e9dc1c905aa9a3297276297565a5c5044c441012949235979913913/kapitan-0.23.0.tar.gz (91kB)
     |████████████████████████████████| 92kB 199kB/s 
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-t448nq__/kapitan/setup.py", line 55, in <module>
        pkgs, new_links = install_deps()
      File "/tmp/pip-install-t448nq__/kapitan/setup.py", line 41, in install_deps
        with open('requirements.txt', 'r') as f:
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-t448nq__/kapitan/
@adrianchifor

This comment has been minimized.

Copy link
Collaborator

commented May 6, 2019

What version of python are you using? I've just tested and kapitan installs just fine on a fresh virtualenv for python 3.6 and 3.7.

@@ -64,13 +64,13 @@ Kapitan needs Python 3.6.
User (`$HOME/.local/lib/python3.6/bin` on Linux or `$HOME/Library/Python/3.6/bin` on macOS):

```shell
pip3 install --user --upgrade kapitan

This comment has been minimized.

Copy link
@adrianchifor

adrianchifor May 6, 2019

Collaborator

We still need --user

[docs] Updates pip installation command
- See #188 for more details

@captn3m0 captn3m0 force-pushed the captn3m0:pip-install-binary branch from 9d749be to d4645fc May 7, 2019

@captn3m0

This comment has been minimized.

Copy link
Author

commented May 7, 2019

@adrianchifor It seems that the installation depends on your pip configuration, even for Python 3.6 (The above was on 3.7). I have the following in my pip.conf :

[install]
user = yes
no-binary = :all:

And that breaks the installation only for kapitan. Kapitan's source package on PyPi is broken because it doesn't ship with a requirements.txt file, and this ensures that the installation passes for all setups. (The right fix might be to just ensure that the package has requirements.txt file?)

@captn3m0

This comment has been minimized.

Copy link
Author

commented May 7, 2019

Can be forced in Python 3.6 with:

pip install --no-binary kapitan kapitan
Collecting kapitan
  Downloading https://files.pythonhosted.org/packages/ca/df/6e4c4e9dc1c905aa9a3297276297565a5c5044c441012949235979913913/kapitan-0.23.0.tar.gz (91kB)
     |████████████████████████████████| 92kB 297kB/s 
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-a0y86qsz/kapitan/setup.py", line 55, in <module>
        pkgs, new_links = install_deps()
      File "/tmp/pip-install-a0y86qsz/kapitan/setup.py", line 41, in install_deps
        with open('requirements.txt', 'r') as f:
    FileNotFoundError: [Errno 2] No such file or directory: 'requirements.txt'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-a0y86qsz/kapitan/
WARNING: You are using pip version 19.1, however version 19.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
# pip --version
pip 19.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)
# python --version
Python 3.6.8
@uberspot

This comment has been minimized.

Copy link
Collaborator

commented May 7, 2019

The proper fix for this would actually be to include the requirements.txt file in pip.
@captn3m0 could you add the new line include requirements.txt in MANIFEST.in and add it to this PR too?
That controls what's packaged in PyPi. We can/should test that instead for a future-proof fix.

@adrianchifor

This comment has been minimized.

Copy link
Collaborator

commented May 13, 2019

requirements.txt has been included in package in #287, closing this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.