takluyver / entrypoints

Discover and load entry points from installed packages
https://entrypoints.readthedocs.io/
MIT License
74 stars 29 forks source link

entrypoints unavailable for python 3.6? #15

Closed blaiseli closed 7 years ago

blaiseli commented 7 years ago

I fail to install ipywidgets with pip under python 3.6 on Xubuntu 16.04 with the following message:

Collecting entrypoints>=0.2.2 (from nbconvert->notebook>=4.4.1->widgetsnbextension~=2.0.0->ipywidgets)
  Could not find a version that satisfies the requirement entrypoints>=0.2.2 (from nbconvert->notebook>=4.4.1->widgetsnbextension~=2.0.0->ipywidgets) (from versions: )
No matching distribution found for entrypoints>=0.2.2 (from nbconvert->notebook>=4.4.1->widgetsnbextension~=2.0.0->ipywidgets)

If I try to install entrypoints alone:

$ pip3.6 install entrypoints
Collecting entrypoints
  Could not find a version that satisfies the requirement entrypoints (from versions: )
No matching distribution found for entrypoints
takluyver commented 7 years ago

It's working here. Is it possible that you somehow have an old version of pip? Try pip install --upgrade setuptools pip

blaiseli commented 7 years ago

I managed to update pip, but not setuptools:

$ pip3.6 -V
pip 9.0.1 from /home/bli/lib/python3.6/site-packages (python 3.6)
$ pip3.6 install --upgrade setuptools
Collecting setuptools
  Downloading setuptools-34.3.0.zip (621kB)
    100% |████████████████████████████████| 624kB 6.5MB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-rhy5x9x5/setuptools/setuptools/__init__.py", line 12, in <module>
        import setuptools.version
      File "/tmp/pip-build-rhy5x9x5/setuptools/setuptools/version.py", line 1, in <module>
        import pkg_resources
      File "/tmp/pip-build-rhy5x9x5/setuptools/pkg_resources/__init__.py", line 70, in <module>
        import packaging.version
    ModuleNotFoundError: No module named 'packaging'

I had to pip3.6 install packaging, but then a similar problem occurred with appdirs, which I sucessfully installed using pip3.6.

Finally I could upgrade setuptools:

$ pip3.6 install --upgrade setuptools
Collecting setuptools
  Downloading setuptools-34.3.0.zip (621kB)
    100% |████████████████████████████████| 624kB 5.7MB/s 
Requirement already up-to-date: packaging>=16.8 in /home/bli/.local/lib/python3.6/site-packages (from setuptools)
Requirement already up-to-date: six>=1.6.0 in /home/bli/.local/lib/python3.6/site-packages (from setuptools)
Requirement already up-to-date: appdirs>=1.4.0 in /home/bli/.local/lib/python3.6/site-packages (from setuptools)
Requirement already up-to-date: pyparsing in /home/bli/.local/lib/python3.6/site-packages (from packaging>=16.8->setuptools)
Installing collected packages: setuptools
  Running setup.py install for setuptools ... done
Successfully installed setuptools-34.3.0

But entrypoints still seems unavailable:

$ pip3.6 install entrypoints
Collecting entrypoints
  Could not find a version that satisfies the requirement entrypoints (from versions: )
No matching distribution found for entrypoints
takluyver commented 7 years ago

Weird. Do you have any environment variables or config files that pip might be looking at?

blaiseli commented 7 years ago

I have a pip.conf file:

$ cat ~/.config/pip/pip.conf
[global]
timeout = 30
no-cache-dir = false
[install]
user=1
compile=1
no-binary=:all:

and a .pydistutils.cfg file:

$ cat ~/.pydistutils.cfg
[install]
#user=1
optimize=1
[build_ext]
include_dirs=${HOME}/include
library_dirs=${HOME}/lib
rpath=${HOME}/lib
user=1

Other than that, I don't know.

Is there some pip package cache somewhere that I would need to manually update?

takluyver commented 7 years ago
no-binary=:all:

That's the culprit. Entrypoints only has wheels on PyPI (I'm trying to push the PEPs necessary to allow source distributions to use alternative packaging tools). It's not really 'binary' because it's pure Python code, but pip treats all wheels are 'binary', so that flag stops it from finding them.

blaiseli commented 7 years ago

Temporarily commenting this option solved the problem. Thanks for your help.

takluyver commented 7 years ago

:-) glad it worked for you