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

Install fails in setup.py (from package requiring progressbar2) on python 3.5 #81

Closed
tomkooij opened this issue Jul 11, 2016 · 7 comments

Comments

@tomkooij
Copy link

tomkooij commented Jul 11, 2016

Description

While installing sapphire link: python setup.py develop progressbar2 is installed by setuptools. Unfortunately this fails (on python 3.5, while python 2.7 works). It only fails on windows. Linux works.

pip install progressbar2 works.

Code

python setup.py develop

Snippet of failure:

Searching for progressbar2>=3.7.0
Reading https://pypi.python.org/simple/progressbar2/
Best match: progressbar2 3.9.4
Downloading https://pypi.python.org/packages/7e/16/12fe92a4c549a0c9a41347fad0c55bd7e1a00605aee85893185756db2cc9/progressbar2-3.9.4.tar.gz#md5=f894a955c35b14a848f5af9eefed3ed7
Processing progressbar2-3.9.4.tar.gz
Writing C:\Users\tom_k\AppData\Local\Temp\easy_install-nvkc0t3w\progressbar2-3.9.4\setup.cfg
Running progressbar2-3.9.4\setup.py -q bdist_egg --dist-dir C:\Users\tom_k\AppData\Local\Temp\easy_install-nvkc0t3w\progressbar2-3.9.4\egg-dist-tmp-o27q8a19
error: Setup script exited with error: [Errno 2] No such file or directory: 'build\\bdist.win-amd64\\egg\\setuptools_scm\\__pycache__\\integration.cpython-35.pyc.2167326687536'

full log

Versions

  • Python version: 3.5
  • Python distribution/environment: Anaconda
  • Operating System: Windows 10. (Linux works).
  • Package version: 3.9.4

Let me know which other information is needed.

@wolph
Copy link
Owner

wolph commented Jul 11, 2016

Would it be possible that it's breaking due to a missing setuptools? I'm just guessing here as I'm not able to reproduce it myself (no Windows).

Could you try installing/updating setuptools and try again? That might help in solving the issue :)

@tomkooij
Copy link
Author

tomkooij commented Jul 12, 2016

setuptools-23.0.0 installed. Upgraded to `setuptools-24.0.2' with pip, but no change. Same failure.

pip install package-that-requires-progressbar2 works.
git clone package-that-requires-progressbar2 && cd package && python setup.py install fails on installing the progressbar egg.

Verbose log

There are many conda/setuptools issues, so I'm not sure there is any use in debugging this. If I can help: let me know.

@wolph
Copy link
Owner

wolph commented Jul 13, 2016

I have to say that I never package eggs so that part is a little untested. I only create source and wheel releases.

Having that said, so far I'm unable to reproduce this issue using a Python 3.5 install using Anaconda on Windows 7. I can't say I understand the error either... are you sure it's not some environmental thing (some random .pyc files?)

@tomkooij
Copy link
Author

tomkooij commented Jul 13, 2016

I start off with a 'fresh' conda enviroment but some other packages are installed by setuptools before progressbar2, so perhaps it is some wierd conflict. and an empty package fails as well:

I created an "empty" package, with setup.py:

from setuptools import setup, find_packages

setup(name='test',
      version='1.0.0',
      packages=find_packages(),
      install_requires=['progressbar2>=3.7.0'],)

Then (Windows 10):

conda create -n test python=3.5
activate test
python setup.py develop

results in:

[test] D:\sapphire>python setup.py develop
running develop
running egg_info
creating test.egg-info
writing test.egg-info\PKG-INFO
writing top-level names to test.egg-info\top_level.txt
writing requirements to test.egg-info\requires.txt
writing dependency_links to test.egg-info\dependency_links.txt
writing manifest file 'test.egg-info\SOURCES.txt'
reading manifest file 'test.egg-info\SOURCES.txt'
writing manifest file 'test.egg-info\SOURCES.txt'
running build_ext
Creating c:\miniconda2\envs\test\lib\site-packages\test.egg-link (link to .)
Adding test 1.0.0 to easy-install.pth file

Installed d:\sapphire
Processing dependencies for test==1.0.0
Searching for progressbar2>=3.7.0
Reading https://pypi.python.org/simple/progressbar2/
Best match: progressbar2 3.9.4
Downloading https://pypi.python.org/packages/7e/16/12fe92a4c549a0c9a41347fad0c55bd7e1a00605aee85893185756db2cc9/progressbar2-3.9.4.tar.gz#md5=f894a955c35b14a848f5af9eefed3ed7
Processing progressbar2-3.9.4.tar.gz
Writing C:\Users\tom_k\AppData\Local\Temp\easy_install-d113yn98\progressbar2-3.9.4\setup.cfg
Running progressbar2-3.9.4\setup.py -q bdist_egg --dist-dir C:\Users\tom_k\AppData\Local\Temp\easy_install-d113yn98\progressbar2-3.9.4\egg-dist-tmp-655re76i
error: Setup script exited with error: [Errno 2] No such file or directory: 'build\\bdist.win-amd64\\egg\\setuptools_scm\\__pycache__\\integration.cpython-35.pyc.2445265009968'

So the same error for an empty package that requires progressbar2. Anyway, this is easily fixed by pip install progressbar2 and does not occur with pip install package and only on Windows, so we better attribute this to "some conda thing" and forget about it.

@bastelflp
Copy link

bastelflp commented Jul 13, 2016

I tested all python setup.py develop calls each in a new conda environment on Windows 7 (x64) from:

  1. the up-to-date develop branch of python-progressbar repository
  2. the empty package above from @tomkooij
  3. the up-to-date py2to3 branch of sapphire

The first and second call work, the third call in the sapphire repository lead to an error, but another one as @tomkooij mentioned above (after successful installing progressbar2 it fails at tables):

Installed [...path...]\anaconda\envs\test42\lib\site-packages\progressbar2-3.9.4-py3.5.egg
Searching for tables>=3.2.0
Reading https://pypi.python.org/simple/tables/
Best match: tables 3.2.3.1
Downloading https://pypi.python.org/packages/0c/eb/e2def4cefade4b2427b8737b7c67cd00db8746dbb02dbfcf66a010f13954/tables-3.2.3.1.tar.gz#md5=9a15d8ab9c41b23979ae3f1751c06878
Processing tables-3.2.3.1.tar.gz
Writing [...userprofile...]\AppData\Local\Temp\easy_install-y_r5zc_d\tables-3.2.3.1\setup.cfg
Running tables-3.2.3.1\setup.py -q bdist_egg --dist-dir [...userprofile...]\AppData\Local\Temp\easy_install-y_r5zc_d\tables-3.2.3.1\egg-dist-tmp-kbpkc8t8
* Using Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul  5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
* USE_PKGCONFIG: False
* Found HDF5 using system PATH ('[...path...]\Anaconda\Library\bin')
[...path...]\Anaconda\envs\test42\lib\re.py:203: FutureWarning: split() requires a non-empty pattern match.
  return _compile(pattern, flags).split(string, maxsplit)
error: Unable to find vcvarsall.bat

Full log at http://pastebin.com/2QWFu5fH


Installing tables again in a new conda environment fails as well:

λ pip install tables
Collecting tables
  Downloading tables-3.2.3.1.tar.gz (7.1MB)
    100% |################################| 7.1MB 126kB/s
    Complete output from command python setup.py egg_info:
    [...path...]\Anaconda\envs\test8\lib\re.py:203: FutureWarning: split() requires a non-empty pattern match.
      return _compile(pattern, flags).split(string, maxsplit)
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "[...userprofile...]\AppData\Local\Temp\pip-build-ojzonw7i\tables\setup.py", line 584, in <module>
        libraries=(package.library_name,))
      File "[...path...]\Anaconda\envs\test8\lib\distutils\ccompiler.py", line 791, in has_function
        objects = self.compile([fname], include_dirs=include_dirs)
      File "[...path...]\Anaconda\envs\test8\lib\distutils\_msvccompiler.py", line 306, in compile
        self.initialize()
      File "[...path...]\Anaconda\envs\test8\lib\distutils\_msvccompiler.py", line 199, in initialize
        vc_env = _get_vc_env(plat_spec)
      File "[...path...]\Anaconda\envs\test8\lib\distutils\_msvccompiler.py", line 85, in _get_vc_env
        raise DistutilsPlatformError("Unable to find vcvarsall.bat")
    distutils.errors.DistutilsPlatformError: Unable to find vcvarsall.bat
    * Using Python 3.5.2 |Continuum Analytics, Inc.| (default, Jul  5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)]
    * USE_PKGCONFIG: False
    * Found HDF5 using system PATH ('[...path...]\Anaconda\Library\bin')

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in [...userprofile...]\AppData\Local\Temp\pip-build-ojzonw7i\tables\

... but if it is installed as conda package via conda install pytables everything works.


Anaconda environment:

λ conda create -n test42 python=3.5
Fetching package metadata .......
Solving package specifications: ..........

Package plan for installation in environment C:\Users\usr\Anaconda\envs\test42:

The following NEW packages will be INSTALLED:

    pip:            8.1.2-py35_0
    python:         3.5.2-0
    setuptools:     23.0.0-py35_0
    vs2015_runtime: 14.0.25123-0
    wheel:          0.29.0-py35_0

Python version:

λ python --version
Python 3.5.2 :: Continuum Analytics, Inc.

@tomkooij
Copy link
Author

tomkooij commented Jul 14, 2016

@bastelflp Thanks for testing Philipp. I'm going to close this, as the issue seems to be limited to my enviroment only.

We (sapphire) do not recommend installing pytables via pip/setuptools, especially on windows. But I'll look into the pytables install problem. EDIT: This seems to indicate pip cannot find the MSVC compiler: answer on SO

@wolph
Copy link
Owner

wolph commented Jul 16, 2016

Wow... that's a weird error. Why can't things ever be normal on Windows :P

Thanks for the very detailed bug report and all the test cases! It's appreciated :)

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

No branches or pull requests

3 participants