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

JamSpell is failing with custom installation location #81

Open
arroyc opened this issue Jul 18, 2019 · 2 comments
Open

JamSpell is failing with custom installation location #81

arroyc opened this issue Jul 18, 2019 · 2 comments

Comments

@arroyc
Copy link

arroyc commented Jul 18, 2019

Jamspell doesn't support custom installation

Collecting jamspell
Using cached https://files.pythonhosted.org/packages/5a/16/0a808e926a835604007066085cb2183b337694a06240a99945b31fa14f27/jamspell-0.0.11.tar.gz
Building wheels for collected packages: jamspell
Building wheel for jamspell (setup.py) ... error
ERROR: Complete output from command /opt/python/2.7.16/bin/python2.7 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-2NGzR0/jamspell/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-2UZksx --python-tag cp27:
ERROR: running bdist_wheel
running build
running build_ext
building '_jamspell' extension
swigging jamspell.i to jamspell_wrap.cpp
/usr/bin/swig3.0 -python -c++ -o jamspell_wrap.cpp jamspell.i
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/jamspell
creating build/temp.linux-x86_64-2.7/contrib
creating build/temp.linux-x86_64-2.7/contrib/cityhash
creating build/temp.linux-x86_64-2.7/contrib/phf
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell/lang_model.cpp -o build/temp.linux-x86_64-2.7/jamspell/lang_model.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell/spell_corrector.cpp -o build/temp.linux-x86_64-2.7/jamspell/spell_corrector.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell/utils.cpp -o build/temp.linux-x86_64-2.7/jamspell/utils.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell/perfect_hash.cpp -o build/temp.linux-x86_64-2.7/jamspell/perfect_hash.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell/bloom_filter.cpp -o build/temp.linux-x86_64-2.7/jamspell/bloom_filter.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c contrib/cityhash/city.cc -o build/temp.linux-x86_64-2.7/contrib/cityhash/city.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c contrib/phf/phf.cc -o build/temp.linux-x86_64-2.7/contrib/phf/phf.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell_wrap.cpp -o build/temp.linux-x86_64-2.7/jamspell_wrap.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
creating build/lib.linux-x86_64-2.7
g++ -pthread -shared build/temp.linux-x86_64-2.7/jamspell/lang_model.o build/temp.linux-x86_64-2.7/jamspell/spell_corrector.o build/temp.linux-x86_64-2.7/jamspell/utils.o build/temp.linux-x86_64-2.7/jamspell/perfect_hash.o build/temp.linux-x86_64-2.7/jamspell/bloom_filter.o build/temp.linux-x86_64-2.7/contrib/cityhash/city.o build/temp.linux-x86_64-2.7/contrib/phf/phf.o build/temp.linux-x86_64-2.7/jamspell_wrap.o -L/opt/python/2.7.16/lib -lpython2.7 -o build/lib.linux-x86_64-2.7/_jamspell.so
running build_py
copying jamspell.py -> build/lib.linux-x86_64-2.7
running egg_info
writing jamspell.egg-info/PKG-INFO
writing top-level names to jamspell.egg-info/top_level.txt
writing dependency_links to jamspell.egg-info/dependency_links.txt
reading manifest file 'jamspell.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'jamspell.egg-info/SOURCES.txt'
installing to build/bdist.linux-x86_64/wheel
running install
Checking .pth file support in build/bdist.linux-x86_64/wheel/
/opt/python/2.7.16/bin/python2.7 -E -c pass
TEST FAILED: build/bdist.linux-x86_64/wheel/ does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

  build/bdist.linux-x86_64/wheel/

and your PYTHONPATH environment variable currently contains:

  '/opt/python/2.7.16/lib:/opt/python/3.6.9/lib:/opt/python/3.7.4/lib:/opt/python/3.8.0b2/lib:/tmp/1'

Here are some of your options for correcting the problem:

  • You can choose a different installation directory, i.e., one that is
    on PYTHONPATH or supports .pth files

  • You can add the installation directory to the PYTHONPATH environment
    variable. (It must then also be on PYTHONPATH whenever you run
    Python and want to use the package(s) you are installing.)

  • You can set up the installation directory to support ".pth" files by
    using one of the approaches described here:

    https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.

ERROR: Failed building wheel for jamspell

`Running setup.py clean for jamspell
Failed to build jamspell
Installing collected packages: jamspell
Running setup.py install for jamspell ... -/opt/python/2.7.16/bin/python2.error
ERROR: Complete output from command /opt/python/2.7.16/bin/python2.7 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-2NGzR0/jamspell/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-hnA8u6/install-record.txt --single-version-externally-managed --compile --home=/tmp/pip-target-LDFJ_P:
ERROR: running install
running build_ext
building '_jamspell' extension
swigging jamspell.i to jamspell_wrap.cpp
/usr/bin/swig3.0 -python -c++ -o jamspell_wrap.cpp jamspell.i
creating build
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/jamspell
creating build/temp.linux-x86_64-2.7/contrib
creating build/temp.linux-x86_64-2.7/contrib/cityhash
creating build/temp.linux-x86_64-2.7/contrib/phf
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell/lang_model.cpp -o build/temp.linux-x86_64-2.7/jamspell/lang_model.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell/spell_corrector.cpp -o build/temp.linux-x86_64-2.7/jamspell/spell_corrector.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell/utils.cpp -o build/temp.linux-x86_64-2.7/jamspell/utils.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell/perfect_hash.cpp -o build/temp.linux-x86_64-2.7/jamspell/perfect_hash.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell/bloom_filter.cpp -o build/temp.linux-x86_64-2.7/jamspell/bloom_filter.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c contrib/cityhash/city.cc -o build/temp.linux-x86_64-2.7/contrib/cityhash/city.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c contrib/phf/phf.cc -o build/temp.linux-x86_64-2.7/contrib/phf/phf.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I. -Ijamspell -I/opt/python/2.7.16/include/python2.7 -c jamspell_wrap.cpp -o build/temp.linux-x86_64-2.7/jamspell_wrap.o -std=c++11 -O2
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
creating build/lib.linux-x86_64-2.7
g++ -pthread -shared build/temp.linux-x86_64-2.7/jamspell/lang_model.o build/temp.linux-x86_64-2.7/jamspell/spell_corrector.o build/temp.linux-x86_64-2.7/jamspell/utils.o build/temp.linux-x86_64-2.7/jamspell/perfect_hash.o build/temp.linux-x86_64-2.7/jamspell/bloom_filter.o build/temp.linux-x86_64-2.7/contrib/cityhash/city.o build/temp.linux-x86_64-2.7/contrib/phf/phf.o build/temp.linux-x86_64-2.7/jamspell_wrap.o -L/opt/python/2.7.16/lib -lpython2.7 -o build/lib.linux-x86_64-2.7/_jamspell.so
Checking .pth file support in /tmp/pip-target-LDFJ_P/lib/python/
/opt/python/2.7.16/bin/python2.7 -E -c pass
TEST FAILED: /tmp/pip-target-LDFJ_P/lib/python/ does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /tmp/pip-target-LDFJ_P/lib/python/

and your PYTHONPATH environment variable currently contains:

    '/opt/python/2.7.16/lib:/opt/python/3.6.9/lib:/opt/python/3.7.4/lib:/opt/python/3.8.0b2/lib:/tmp/1'

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:

  https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations


Please make the appropriate changes for your system and try again.
----------------------------------------

Cleaning up...
ERROR: Command "/opt/python/2.7.16/bin/python2.7 -u -c 'import setuptools, tokenize;file='"'"'/tmp/pip-install-2NGzR0/jamspell/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-hnA8u6/install-record.txt --single-version-externally-managed --compile --home=/tmp/pip-target-LDFJ_P" failed with error code 1 in /tmp/pip-install-2NGzR0/jamspell`

@arroyc
Copy link
Author

arroyc commented Jul 18, 2019

root@065257381c83:~# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/6/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 6.3.0-18+deb9u1' --with-bugurl=file:///usr/share/doc/gcc-6/README.Bugs --enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-6 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-libmpx --enable-plugin --enable-default-pie --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-6-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-6-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-6-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --with-target-system-zlib --enable-objc-gc=auto --enable-multiarch --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)

root@065257381c83:~# pip --version
pip 19.1.1 from /opt/python/2.7.16/lib/python2.7/site-packages/pip (python 2.7)

root@065257381c83:~# python --version
Python 2.7.16

@arroyc
Copy link
Author

arroyc commented Jul 18, 2019

building wheel for jamspell still fails when I use pip install jamspell, but it's successful when it runs setup.py

Running setup.py clean for jamspell
Failed to build jamspell
Installing collected packages: jamspell
Running setup.py install for jamspell ... done
WARNING: Could not find .egg-info directory in install record for jamspell from https://files.pythonhosted.org/packages/5a/16/0a808e926a835604007066085cb2183b337694a06240a99945b31fa14f27/jamspell-0.0.11.tar.gz#sha256=6dcaf1ae631af6c0904f9ba016bf2404e930237eb73e4d471ee92a77327af8f1
Successfully installed jamspell
Cleaning up...

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

1 participant