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

Installs with pip on python 2 #9

Closed
BertRaeymaekers opened this issue Nov 9, 2018 · 3 comments
Closed

Installs with pip on python 2 #9

BertRaeymaekers opened this issue Nov 9, 2018 · 3 comments
Labels
bug Something isn't working

Comments

@BertRaeymaekers
Copy link

Hi,

I pip installed wily on a python2. And pip allowed me to do that. But it shouldn't work given that you use f-strings. I think it is possible to indicate a minimal python version (3.6?) on pipy.
Perhaps this isn't an issue against the code base, but as I can't think of a better place to report it, I'll do it here.

Bert

@tonybaloney
Copy link
Owner

thanks Bert.

It specifies Python 3.6+ in the metadata, which should raise a warning/error for older versions of Python. https://github.com/tonybaloney/wily/blob/master/pyproject.toml#L31
That metadata tag was only introduced in the 1.2 Metadata API

Curious to know:

  • Which version of Pip are you using?
  • Which version of wily did it install?

@tonybaloney tonybaloney added the bug Something isn't working label Nov 9, 2018
@BertRaeymaekers
Copy link
Author

It looks like it is installing WIly 0.2.0 on python 2.7 (pip 18.1)

The full walk-through:
bert@bert-i7000:/python_workspace$ mkdir wily-test
bert@bert-i7000:
/python_workspace$ cd wily-test/
bert@bert-i7000:/python_workspace/wily-test$ python --version
Python 2.7.13
bert@bert-i7000:
/python_workspace/wily-test$ python -m virtualenv venv2
Running virtualenv with interpreter /usr/bin/python2
New python executable in /home/bert/python_workspace/wily-test/venv2/bin/python2
Also creating executable in /home/bert/python_workspace/wily-test/venv2/bin/python
Installing setuptools, pkg_resources, pip, wheel...done.
bert@bert-i7000:/python_workspace/wily-test$ source venv2/bin/activate
(venv2) bert@bert-i7000:
/python_workspace/wily-test$ pip --version
pip 18.1 from /home/bert/python_workspace/wily-test/venv2/local/lib/python2.7/site-packages/pip (python 2.7)
(venv2) bert@bert-i7000:/python_workspace/wily-test$ pip install --upgrade pip
Requirement already up-to-date: pip in ./venv2/lib/python2.7/site-packages (18.1)
(venv2) bert@bert-i7000:
/python_workspace/wily-test$ pip install --upgrade virtualenv
Collecting virtualenv
Using cached https://files.pythonhosted.org/packages/7c/17/9b7b6cddfd255388b58c61e25b091047f6814183e1d63741c8df8dcd65a2/virtualenv-16.1.0-py2.py3-none-any.whl
Installing collected packages: virtualenv
Successfully installed virtualenv-16.1.0
(venv2) bert@bert-i7000:/python_workspace/wily-test$ pip install wily
Collecting wily
Using cached https://files.pythonhosted.org/packages/f9/81/65c23c01a56dbf393335c5b6b5120f4dc33433f1e6b01a1c3609d5b8b1b5/wily-0.2.0-py2.py3-none-any.whl
Installing collected packages: wily
Successfully installed wily-0.2.0
(venv2) bert@bert-i7000:
/python_workspace/wily-test$ wily
Traceback (most recent call last):
File "/home/bert/python_workspace/wily-test/venv2/bin/wily", line 7, in
from wily.main import cli
File "/home/bert/python_workspace/wily-test/venv2/local/lib/python2.7/site-packages/wily/init.py", line 4, in
import colorlog
ImportError: No module named colorlog
(venv2) bert@bert-i7000:~/python_workspace/wily-test$ ls -lrt /home/bert/python_workspace/wily-test/venv2/lib/python2.7/site-packages/
totaal 244
-rw-r--r-- 1 bert bert 126 nov 11 10:16 easy_install.py
-rw-r--r-- 1 bert bert 315 nov 11 10:16 easy_install.pyc
drwxr-xr-x 4 bert bert 4096 nov 11 10:16 pkg_resources
drwxr-xr-x 5 bert bert 4096 nov 11 10:16 setuptools
drwxr-xr-x 2 bert bert 4096 nov 11 10:16 setuptools-40.5.0.dist-info
drwxr-xr-x 2 bert bert 4096 nov 11 10:16 pkg_resources-0.0.0.dist-info
drwxr-xr-x 4 bert bert 4096 nov 11 10:16 pip
drwxr-xr-x 2 bert bert 4096 nov 11 10:16 pip-18.1.dist-info
drwxr-xr-x 2 bert bert 4096 nov 11 10:16 wheel-0.32.2.dist-info
drwxr-xr-x 3 bert bert 4096 nov 11 10:16 wheel
-rw-r--r-- 1 bert bert 101286 nov 11 10:16 virtualenv.py
-rw-r--r-- 1 bert bert 88602 nov 11 10:16 virtualenv.pyc
drwxr-xr-x 2 bert bert 4096 nov 11 10:16 virtualenv_support
drwxr-xr-x 2 bert bert 4096 nov 11 10:16 virtualenv-16.1.0.dist-info
drwxr-xr-x 5 bert bert 4096 nov 11 10:16 wily
drwxr-xr-x 2 bert bert 4096 nov 11 10:16 wily-0.2.0.dist-info

@tonybaloney
Copy link
Owner

Looks like I added the metadata after version 0.2.

Have removed early builds from PyPi, verified this now gives the correct message:

➜  ~ python2 -V
Python 2.7.15
➜  ~ pip2 -V
pip 9.0.3 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (python 2.7)
➜  ~ pip2 install --upgrade pip
Cache entry deserialization failed, entry ignored
Collecting pip
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/c2/d7/90f34cb0d83a6c5631cf71dfe64cc1054598c843a92b400e55675cc2ac37/pip-18.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 726kB/s 
Installing collected packages: pip
  Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
Successfully installed pip-18.1
➜  ~ pip2 install wily
Collecting wily
  Could not find a version that satisfies the requirement wily (from versions: )
No matching distribution found for wily
➜  ~ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants