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

Note in documentation about broken Python 2.7.12 and Virtualenv installation on Ubuntu 16.04 #1952

Closed
reist opened this issue Apr 11, 2018 · 17 comments
Labels
good first issue Issues suitable as a newcomer to get familiar with Pipenv! rotten Type: Documentation 📖 This issue relates to documentation of pipenv.

Comments

@reist
Copy link

reist commented Apr 11, 2018

I'm trying to install an older version of googleads.
On a blank pipenv directory, using pipenv run pip install googleads==9.0.0 (or just pip directly) installs the correct dependencies and nothing else.
Running pipenv install googleads==9.0.0, though, adds all the dependencies of the latest googleads as well (zeep, google-auth-oauthlib). Can be seen later in Pipfile.lock, running pipenv graph, etc. These additions do not get listed in the log:

Creating a virtualenv for this project…             
Using /usr/bin/python3 (3.6.4) to create virtualenv…
⠋Already using interpreter /usr/bin/python3    
Using base prefix '/usr'                                
New python executable in /home/reist/.local/share/virtualenvs/random2-iq1Y4LfB/bin/python3
Also creating executable in /home/reist/.local/share/virtualenvs/random2-iq1Y4LfB/bin/python
Installing setuptools, pip, wheel...done.     
                                                                            
Virtualenv location: /home/reist/.local/share/virtualenvs/random2-iq1Y4LfB
Creating a Pipfile for this project…                                     
Installing googleads==9.0.0…                 
Collecting googleads==9.0.0                                                         
Collecting pytz>=2015.7 (from googleads==9.0.0)         
  Using cached pytz-2018.4-py2.py3-none-any.whl                                                                                                 
Collecting PyYAML<4.0,>=3.11 (from googleads==9.0.0)                                                                                                                                           Collecting xmltodict<1.0.0,>=0.9.2 (from googleads==9.0.0)
  Using cached xmltodict-0.11.0-py2.py3-none-any.whl
Collecting httplib2<1.0.0,>=0.9.2 (from googleads==9.0.0)
Collecting oauth2client<5.0.0,>=4.0.0 (from googleads==9.0.0)
  Using cached oauth2client-4.1.2-py2.py3-none-any.whl
Collecting pysocks<2.0.0,>=1.5.6 (from googleads==9.0.0)
Collecting suds-jurko<0.7,>=0.6 (from googleads==9.0.0)
Collecting six>=1.6.1 (from oauth2client<5.0.0,>=4.0.0->googleads==9.0.0)
  Using cached six-1.11.0-py2.py3-none-any.whl
Collecting pyasn1-modules>=0.0.5 (from oauth2client<5.0.0,>=4.0.0->googleads==9.0.0)
  Using cached pyasn1_modules-0.2.1-py2.py3-none-any.whl        
Collecting pyasn1>=0.1.7 (from oauth2client<5.0.0,>=4.0.0->googleads==9.0.0)
  Using cached pyasn1-0.4.2-py2.py3-none-any.whl
Collecting rsa>=3.1.4 (from oauth2client<5.0.0,>=4.0.0->googleads==9.0.0)
  Using cached rsa-3.4.2-py2.py3-none-any.whl
Installing collected packages: pytz, PyYAML, xmltodict, httplib2, six, pyasn1, pyasn1-modules, rsa, oauth2client, pysocks, suds-jurko, googleads
Successfully installed PyYAML-3.12 googleads-9.0.0 httplib2-0.11.3 oauth2client-4.1.2 pyasn1-0.4.2 pyasn1-modules-0.2.1 pysocks-1.6.8 pytz-2018.4 rsa-3.4.2 six-1.11.0 suds-jurko-0.6 xmltodict
-0.11.0```
@techalchemy techalchemy added the Status: Needs More Information This issue does not provide enough information to take further action. label Apr 11, 2018
@techalchemy
Copy link
Member

Please fill out the full issue template including running python -m pipenv.help. This exists to help us troubleshoot. We also need to know specifically what dependencies are listed which don’t belong. This stuff is there to help, it may not seem relevant but it is

@reist
Copy link
Author

reist commented Apr 11, 2018

Alright. Results are of pipenv run pip freeze

Expected result
googleads==9.0.0
httplib2==0.11.3
oauth2client==4.1.2
pyasn1==0.4.2
pyasn1-modules==0.2.1
PySocks==1.6.8
pytz==2018.4
PyYAML==3.12
rsa==3.4.2
six==1.11.0
suds-jurko==0.6
xmltodict==0.11.0
Actual result
appdirs==1.4.3
cached-property==1.4.2
cachetools==2.0.1
certifi==2018.1.18
chardet==3.0.4
defusedxml==0.5.0
google-auth==1.4.1
google-auth-oauthlib==0.2.0
googleads==9.0.0
httplib2==0.11.3
idna==2.6
isodate==0.6.0
lxml==4.2.1
oauth2client==4.1.2
oauthlib==2.0.7
pyasn1==0.4.2
pyasn1-modules==0.2.1
PySocks==1.6.8
pytz==2018.4
PyYAML==3.12
requests==2.18.4
requests-oauthlib==0.8.0
requests-toolbelt==0.8.0
rsa==3.4.2
six==1.11.0
suds-jurko==0.6
urllib3==1.22
xmltodict==0.11.0
zeep==2.5.0
Steps to replicate

pipenv install googleads==9.0.0

The partial verbose output of the command seems to take the "secondary dependencies" from the latest version, instead of the requested one. I even tried grep -Ri zeep ~/.local/share/virtualenvs/.../googleads*
Nothing.

ROUND 1
Current constraints:
  googleads==9.0.0

Finding the best candidates:
  found candidate googleads==9.0.0 (constraint was ==9.0.0)
                                 
Finding secondary dependencies:     
  googleads==9.0.0          requires google-auth-oauthlib<1.0.0,>=0.0.1, google-auth<2.0.0,>=1.0.0, pytz>=2015.7, PyYAML<4.0,>=3.11, requests<3.0.0,>=2.0.0, suds-jurko<0.7,>=0.6, xmltodict<1.
0.0,>=0.9.2, zeep>=2.5.0

New dependencies found in this round:
  adding ['google-auth', '<2.0.0,>=1.0.0', '[]']
  adding ['google-auth-oauthlib', '<1.0.0,>=0.0.1', '[]']
  adding ['pytz', '>=2015.7', '[]']
  adding ['pyyaml', '<4.0,>=3.11', '[]']
  adding ['requests', '<3.0.0,>=2.0.0', '[]']
  adding ['suds-jurko', '<0.7,>=0.6', '[]']
  adding ['xmltodict', '<1.0.0,>=0.9.2', '[]']
  adding ['zeep', '>=2.5.0', '[]']
pipenv.help output
<details><summary>$ python -m pipenv.help output</summary>
                         
Pipenv version: `'11.9.0'`
         
Pipenv location: `'/usr/lib64/python3.6/site-packages/pipenv'`
                        
Python location: `'/usr/bin/python3'`
                     
Other Python installations in `PATH`:
                        
  - `2.7`: `/usr/bin/python2.7`
  - `2.7`: `/usr/bin/python2.7`
  - `3.6`: `/usr/bin/python3.6m`
  - `3.6`: `/usr/bin/python3.6`
                
  - `2.7.14`: `/usr/bin/python`       
  - `2.7.14`: `/usr/bin/python2`
  - `3.6.4`: `/usr/bin/python3`
                                     
PEP 508 Information:                                                                                                                                                                   [61/692]
                                                                                                                                                                                               ```                                                                  
{'implementation_name': 'cpython',
 'implementation_version': '3.6.4',
 'os_name': 'posix',     
 'platform_machine': 'x86_64',  
 'platform_python_implementation': 'CPython',
 'platform_release': '4.14.30',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP Sun Mar 25 20:20:49 CDT 2018',
 'python_full_version': '3.6.4',
 'python_version': '3.6',
 'sys_platform': 'linux'}

System environment variables:

  - `LS_COLORS`
  - `M2_HOME`
  - `XDG_MENU_PREFIX`
  - `LANG`
  - `SAPI_REDIS_HOST`
  - `LESS`
  - `DISPLAY`
  - `HOSTNAME`
  - `OLDPWD`
  - `EDITOR`
  - `NODE_PATH`
  - `COLORTERM`
  - `SBCL_HOME`
  - `JAVA_HOME`
  - `AWS_DEFAULT_PROFILE`
  - `KDEDIRS`
  - `HZ`
  - `XIM_PROGRAM`
  - `VBOX_PROGRAM_PATH`
  - `SSH_AUTH_SOCK`
  - `MINICOM`
  - `GROOVY_HOME`
  - `GLADE_CATALOG_PATH`
  - `HUSHLOGIN`
  - `USER`
  - `GLADE_MODULE_PATH`
  - `DESKTOP_SESSION`
  - `LC_COLLATE`
  - `PWD`
  - `INPUTRC`
  - `HOME`
  - `GOROOT`
  - `SSH_AGENT_PID`                                                  
  - `TMUX`                        
  - `XDG_DATA_DIRS`                
  - `SVN_EDITOR`         
  - `T1LIB_CONFIG`              
  - `QT4DIR`                                 
  - `GLADE_PIXMAP_PATH`        
  - `VBOX_SDK_PATH`         
  - `MAIL`                                                 
  - `WINDOWPATH`                
  - `VTE_VERSION`        
  - `TERM`               
  - `SHELL`
  - `QT_IM_MODULE`
  - `XMODIFIERS`             
  - `LS_OPTIONS`
  - `XDG_CURRENT_DESKTOP`
  - `QT5DIR` 
  - `GDK_USE_XFT`    
  - `TMUX_PANE`
  - `SHLVL`          
  - `G_FILENAME_ENCODING`
  - `MANPATH`
  - `WINDOWID`
  - `LOGNAME`
  - `DBUS_SESSION_BUS_ADDRESS`
  - `XDG_RUNTIME_DIR`
  - `XAUTHORITY`
  - `CPLUS_INCLUDE_PATH`
  - `XDG_CONFIG_DIRS`
  - `PATH`               
  - `PS1`    
  - `PS2`
  - `PKG_CONFIG_PATH`
  - `G_BROKEN_FILENAMES`
  - `XDG_SESSION_COOKIE`
  - `SESSION_MANAGER`
  - `LESSOPEN`   
  - `GTK_IM_MODULE`     
  - `_`        
  - `PYTHONDONTWRITEBYTECODE`
  - `PIP_PYTHON_PATH`  
  - `PYTHONUNBUFFERED`
                
Pipenv–specific environment variables:
         
             
Debug–specific environment variables:
  - `PATH`: `/usr/lib64/go1.8.4/go/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/groovy/bin:/usr/lib64/kf5:/usr/lib64/kde4/libexec:/usr/lib64/java/bin:/usr/lib64/java/jre/bin:/usr/li
b64/qt/bin:/usr/lib64/qt5/bin:/home/reist/bin:/home/reist/.local/bin`
  - `SHELL`: `/bin/bash`
  - `EDITOR`: `vim`
  - `LANG`: `en_US.UTF-8`
  - `PWD`: `/home/reist/testing-googleads`


---------------------------

</details>

@techalchemy
Copy link
Member

Ah I think this must be hitting the json api. I thought we disabled that. I just cut a release, can you try that and let me know?

@reist
Copy link
Author

reist commented Apr 11, 2018

Perfect! Got exactly the expected result, and pipenv graph now shows a single tree, instead of the three it had with the previous version.

@frenetic
Copy link

Related to #1745.
This other bug was closed but never solved.

The same thing happens if you try to install django-redis = "==4.4.4".
At this version, django-redis has no dependency on Django. However, the latest version has.

When you try to install it, it will try to install Django as well...

Im using pipenv version 11.10.0.

@techalchemy
Copy link
Member

Thanks for the update @frenetic I briefly lost sight of this but will take care of it

@techalchemy
Copy link
Member

@frenetic I can't reproduce this... what version of python? What version of pip?

@frenetic
Copy link

I can and can't reproduce.

I cant reproduce when:
In a clean environment I try pipenv install django-redis==4.4.4.
Pipenv will use Python 3.5.2 and pip 10.0.0.

I can reproduce when:
In a clean environment I try pipenv install django-redis==4.4.4 --two. (as seen on screenshot)
Pipenv will use Python 2.7.12. It will use pip 10.0.0 from Python 3.

image

@frenetic
Copy link

Should I try installing pip for python 2.7 and checking how things behave?

@frenetic
Copy link

I installed pip 10.0.0 for my python 2.7.
Same thing happens.

@uranusjr
Copy link
Member

I vaguely recall you need to install something extra on Ubuntu (Actually Debian and its derivatives), otherwise virtualenv created from that Python version would be broken. It caused quite a stir in the community.

@techalchemy
Copy link
Member

if you downgrade pip (or wait a few minutes for pip 10.0.1) does it still act teh same?

@frenetic
Copy link

@techalchemy trying with pip at 9.0.3.

My pipenv is at 11.10.0.

image

@philfreo
Copy link
Contributor

See #1522 for an easily reproducible version of this bug

@techalchemy
Copy link
Member

@frenetic as @uranusjr mentioned that distro version of python 2 likely has a separate issue which is why we wind up using a fallback. @philfreo I can’t reproduce this with any of the examples

@frenetic
Copy link

I decided to try this inside docker using image: python:2.
It works as expected...

You guys are right. There is something odd/buggy happening with distro's (Ubuntu) Python 2.

There should be a warning on README for this...

But Im fine using Docker for this.

Thank you guys.

@frenetic
Copy link

Just a side note: the bug only happens when pipenv tries to lock my dependencies.
Using docker to lock, and then using distro's (Ubuntu) python 2 to install dependencies from a Pipfile.lock works great.

@techalchemy techalchemy added Type: Documentation 📖 This issue relates to documentation of pipenv. Category: Dependency Resolution Issue relates to dependency resolution. and removed Status: Needs More Information This issue does not provide enough information to take further action. labels Apr 20, 2018
techalchemy added a commit that referenced this issue Apr 27, 2018
- Still resolve all packages to lockfile
- Fixes #1952

Signed-off-by: Dan Ryan <[email protected]>
@techalchemy techalchemy changed the title pipenv installs dependencies from newest version instead of requested Default Python 2.7.12 installations on ubuntu 16.04 come with broken virtualenv installations and resolve incorrectly Apr 29, 2018
@uranusjr uranusjr changed the title Default Python 2.7.12 installations on ubuntu 16.04 come with broken virtualenv installations and resolve incorrectly Note in documentation about broken Python 2.7.12 and Virtualenv installation on Ubuntu 16.04 Jun 6, 2018
@uranusjr uranusjr added good first issue Issues suitable as a newcomer to get familiar with Pipenv! and removed Category: Dependency Resolution Issue relates to dependency resolution. labels Jun 6, 2018
@oz123 oz123 added the rotten label Jan 23, 2022
@oz123 oz123 closed this as completed Jan 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Issues suitable as a newcomer to get familiar with Pipenv! rotten Type: Documentation 📖 This issue relates to documentation of pipenv.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants