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

PyScaffold breaks the installation of numpy #99

Closed
tmattio opened this issue Jan 22, 2017 · 5 comments
Closed

PyScaffold breaks the installation of numpy #99

tmattio opened this issue Jan 22, 2017 · 5 comments

Comments

@tmattio
Copy link

tmattio commented Jan 22, 2017

Installing pyscaffold for python3 prevents the installation of numpy with python 3 support (on MacOS).

Repro steps:

pip3 install pyscaffold
brew install numpy --with-python3

It gives the following result:

Updating Homebrew...
==> Installing numpy from homebrew/python
==> Using Homebrew-provided fortran compiler.
This may be changed by setting the FC environment variable.
==> Cloning https://github.com/numpy/numpy.git
Cloning into '/Users/Des0ps/Library/Caches/Homebrew/numpy--git'...
remote: Counting objects: 1052, done.
remote: Compressing objects: 100% (1004/1004), done.
remote: Total 1052 (delta 47), reused 306 (delta 20), pack-reused 0
Receiving objects: 100% (1052/1052), 4.27 MiB | 401.00 KiB/s, done.
Resolving deltas: 100% (47/47), done.
==> Checking out branch master
==> Downloading https://files.pythonhosted.org/packages/58/a5/0dc93c3ec33f4e281849523a5a913fa1eea9a30
Already downloaded: /Users/Des0ps/Library/Caches/Homebrew/numpy--nose-1.3.7.tar.gz
==> python -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/numpy/HEAD-d25e73
==> Downloading https://files.pythonhosted.org/packages/b7/67/7e2a817f9e9c773ee3995c1e15204f5d01c8da7
######################################################################## 100.0%
==> python -c import setuptools... --no-user-cfg install --prefix=/private/tmp/numpy-20170122-23249-s
==> python setup.py build --fcompiler=gnu95 --parallel=8 install --prefix=/usr/local/Cellar/numpy/HEA
==> python -c import numpy; assert numpy.test().wasSuccessful()
==> Downloading https://files.pythonhosted.org/packages/58/a5/0dc93c3ec33f4e281849523a5a913fa1eea9a30
Already downloaded: /Users/Des0ps/Library/Caches/Homebrew/numpy--nose-1.3.7.tar.gz
==> python3 -c import setuptools... --no-user-cfg install --prefix=/usr/local/Cellar/numpy/HEAD-d25e7
Last 15 lines from /Users/Des0ps/Library/Logs/Homebrew/numpy/05.python3:
    from pbr import util
  File "/usr/local/lib/python3.6/site-packages/pyscaffold/contrib/pbr/pbr/util.py", line 87, in <module>
    import pbr.hooks
  File "/usr/local/lib/python3.6/site-packages/pyscaffold/contrib/pbr/pbr/hooks/__init__.py", line 16, in <module>
    from pbr.hooks import backwards
  File "/usr/local/lib/python3.6/site-packages/pyscaffold/contrib/pbr/pbr/hooks/backwards.py", line 17, in <module>
    from pbr import packaging
  File "/usr/local/lib/python3.6/site-packages/pyscaffold/contrib/pbr/pbr/packaging.py", line 233, in <module>
    from nose import commands
  File "/private/tmp/numpy--nose-20170122-23249-1w4blaa/nose-1.3.7/nose/__init__.py", line 1, in <module>
    from nose.core import collector, main, run, run_exit, runmodule
  File "/private/tmp/numpy--nose-20170122-23249-1w4blaa/nose-1.3.7/nose/core.py", line 153
    print "%s version %s" % (os.path.basename(sys.argv[0]), __version__)
                        ^
SyntaxError: invalid syntax

READ THIS: http://docs.brew.sh/Troubleshooting.html

These open issues may also help:
numpy fails to build with openblas option https://github.com/Homebrew/homebrew-python/issues/359
numpy 1.11.2 fails a test https://github.com/Homebrew/homebrew-python/issues/353

Here is the ticket on homebrew-python: https://github.com/Homebrew/homebrew-python/issues/387

@FlorianWilhelm
Copy link
Member

Hi @des0ps, thanks for this report. I actually don't think PyScaffold is the reason for this, it rather seems as if nose got installed in a Python 2 version and this is why print "%s version %s" fails with invalid syntax. What happens if you install numpy with pip3?

@tmattio
Copy link
Author

tmattio commented Jan 22, 2017

When installing numpy through pip, it works great, it's only when installing the brew formula with the --with-python3 parameter.

@FlorianWilhelm
Copy link
Member

Therefore the problem is related to the brew formula and nose, not in any way to PyScaffold. If you agree you can close this issue as resolved.

@FlorianWilhelm
Copy link
Member

@des0ps, could also check why your Python3 environment actually pulls packages from /private/tmp/numpy--nose-20170122-23249-1w4blaa/nose-1.3.7/nose/, this is kind of strange. Are you using conda or virtualenv btw? or is brew using /private? I think your setup is a bit messy.

@HolgerPeters
Copy link
Contributor

If I may add, it is a bad idea to mix a package manager with pip. I.e. typically you would always use python virtualenvs for installing such packages. If several tools (brew/pip/apt/easy_install) use the same tree in the file system, it is only to be expected that there will be errors.

willu47 pushed a commit to willu47/pyscaffold that referenced this issue Aug 29, 2017
…041864

d041864 fix issue pyscaffold#86 - detect dirty git workdirs even in the absence of tags
23b8d74 flake8 cleanup
929a5d7 clean up and restructure git workdir handling and status
2617712 update changelog with pyscaffold#86
5538f19 fix issue pyscaffold#86 - detect dirty git workdir without tags
9f360e6 add minimal nix shell config
4a365d2 Merge branch 'master' of github.com:pypa/setuptools_scm
0977be3 correct version in changelog
b0a9576 Merge pull request pyscaffold#104 from RonnyPfannschmidt/master
6e6c18e add code comments for comprehending backward compatibility code
cdda768 troughly pass all versions trough parsed versions
1cd3958 fix issue pyscaffold#103 - reorder version dumping
f9ca54d another changelog update
47f4b79 update changelog
58e1f22 Merge pull request pyscaffold#102 from anarcat/pretend-write
80565e3 properly write version file even if in pretend mode
cf19a20 Show python code in the README properly (pyscaffold#100)
c1fd474 Merge pull request pyscaffold#98 from RonnyPfannschmidt/reenable-hgrcpath
1899597 explicitly specify merge tool for hg merge test
fcde635 allow HGRCPATH env var - potentially fixes pyscaffold#97
4d93251 Merge pull request pyscaffold#99 from RonnyPfannschmidt/fix-travis
98c5c7e work up travis matrix
6384be6 update changelog
4e82375 Merge pull request pyscaffold#91 from te-je/master
a575570 Merge pull request pyscaffold#90 from pypa/issue-88
e7c768a fix pyscaffold#89: windows path comparison bug
b65c1d0 Merge pull request pyscaffold#1 from pypa/master
1b4cddc Correct typo and clarify Sphinx recommended usage. Fixes pyscaffold#88.

git-subtree-dir: pyscaffold/contrib/setuptools_scm
git-subtree-split: d041864fc414512a6772a90ba978826318a75a62
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