question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Installation with Python 3.5 - NameError: name 'pypath' is not defined

See original GitHub issue

Hi,

NameError: name 'pypath' is not defined is thrown when installing pyq with Python 3.5. On the same machine, it installs fine with Python 2.7. kdb+ version is 3.4, 64-bit licensed.

Thanks

(venv) adil@adil-OptiPlex-3020:~/workspace/technical-alerts$ pip install -i https://pyq.enlnt.com --no-binary pyq pyq
Collecting pyq
  Downloading https://github.com/enlnt/pyq/archive/pyq-4.0.1.tar.gz (585kB)
    100% |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 593kB 1.4MB/s 
Skipping bdist_wheel for pyq, due to binaries being disabled for it.
Installing collected packages: pyq
  Running setup.py install for pyq ... error
    Complete output from command /home/adil/workspace/technical-alerts/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-chld175c/pyq/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-wj5cg4zw-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/adil/workspace/technical-alerts/venv/include/site/python3.5/pyq:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.5
    creating build/lib.linux-x86_64-3.5/pyq
    copying src/pyq/__init__.py -> build/lib.linux-x86_64-3.5/pyq
    copying src/pyq/cmd.py -> build/lib.linux-x86_64-3.5/pyq
    copying src/pyq/magic.py -> build/lib.linux-x86_64-3.5/pyq
    copying src/pyq/version.py -> build/lib.linux-x86_64-3.5/pyq
    copying src/pyq/ptk.py -> build/lib.linux-x86_64-3.5/pyq
    copying src/pyq/conftest.py -> build/lib.linux-x86_64-3.5/pyq
    copying src/pyq/_pt_run.py -> build/lib.linux-x86_64-3.5/pyq
    copying src/pyq/_n.py -> build/lib.linux-x86_64-3.5/pyq
    creating build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/__init__.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_com.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_no_numpy.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_sd.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_q.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_magic.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_numpy.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_version.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_pyq_executable.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_threads.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_pypath.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_ci.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_python_q.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_p.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_k.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_memoryview.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_pathlib.py -> build/lib.linux-x86_64-3.5/pyq/tests
    copying src/pyq/tests/test_n.py -> build/lib.linux-x86_64-3.5/pyq/tests
    running build_ext
    building 'pyq._k' extension
    creating build/temp.linux-x86_64-3.5-kx-3
    creating build/temp.linux-x86_64-3.5-kx-3/src
    creating build/temp.linux-x86_64-3.5-kx-3/src/pyq
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DKXVER=3 -DQVER=3 -DPY3K=35 -I/usr/include/python3.5m -I/home/adil/workspace/technical-alerts/venv/include/python3.5m -c src/pyq/_k.c -o build/temp.linux-x86_64-3.5-kx-3/src/pyq/_k.o -Wpointer-arith -Werror -fno-strict-aliasing
    x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-Bsymbolic-functions -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-x86_64-3.5-kx-3/src/pyq/_k.o -o build/lib.linux-x86_64-3.5/pyq/_k.cpython-35m-x86_64-linux-gnu.so
    running build_scripts
    creating build/scripts-3.5
    copying src/scripts/pyq-runtests -> build/scripts-3.5
    copying and adjusting src/scripts/pyq-coverage -> build/scripts-3.5
    copying src/scripts/ipyq -> build/scripts-3.5
    copying src/scripts/pq -> build/scripts-3.5
    copying src/scripts/qp -> build/scripts-3.5
    changing mode of build/scripts-3.5/pyq-coverage from 664 to 775
    changing mode of build/scripts-3.5/ipyq from 664 to 775
    changing mode of build/scripts-3.5/pq from 664 to 775
    changing mode of build/scripts-3.5/qp from 664 to 775
    running build_qk
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-chld175c/pyq/setup.py", line 796, in <module>
        **metadata)
      File "/usr/lib/python3.5/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands
        self.run_command(cmd)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/home/adil/workspace/technical-alerts/venv/lib/python3.5/site-packages/setuptools/command/install.py", line 61, in run
        return orig.install.run(self)
      File "/usr/lib/python3.5/distutils/command/install.py", line 583, in run
        self.run_command('build')
      File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command
        cmd_obj.run()
      File "/usr/lib/python3.5/distutils/command/build.py", line 135, in run
        self.run_command(cmd_name)
      File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/usr/lib/python3.5/distutils/dist.py", line 973, in run_command
        cmd_obj.ensure_finalized()
      File "/usr/lib/python3.5/distutils/cmd.py", line 107, in ensure_finalized
        self.finalize_options()
      File "/tmp/pip-build-chld175c/pyq/setup.py", line 358, in finalize_options
        lib_string = 'lib:"%s\\000"\n' % pypath
    NameError: name 'pypath' is not defined
    ----------------------------------------
Command "/home/adil/workspace/technical-alerts/venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-chld175c/pyq/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-wj5cg4zw-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/adil/workspace/technical-alerts/venv/include/site/python3.5/pyq" failed with error code 1 in /tmp/pip-build-chld175c/pyq/

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
sashkabcommented, Mar 31, 2017

Ubuntu provides statically linked Python. They also provide shared libraries which can be installed using apt install libpython3.5-stdlib libpython3.5-dev.

We identified a bug causing installation troubles on Ubuntu and a fix will be available in the upcoming patch release.

0reactions
sashkabcommented, May 12, 2017

Issue was fixed in PyQ 4.0.2.

We also added a guide on installing PyQ on Ubuntu 16.04.

Read more comments on GitHub >

github_iconTop Results From Across the Web

python NameError: name 'file' is not defined in python 3.5
As Matthias pointed out, scrapy is being ported to Python 3. However, the error you have is in lockfile.py from Twisted, not scrapy:...
Read more >
Python installation problem: No module named 'encodings'
I used the installation file "python-3.5.1-amd64.exe" downloaded from the official Python download site. * During installation, I selectedΒ ...
Read more >
4. Using Python on Windows β€” Python 3.11.1 documentation
This document aims to give an overview of Windows-specific behaviour you should know about when using Python on Microsoft Windows. Unlike most Unix...
Read more >
Installing Python Modules (Legacy version) β€” Python 3.11.1 ...
First, the distribution's name and version number will be featured ... Unless you need to install things in a non-standard way or customize...
Read more >
2. Writing the Setup Script β€” Python 3.11.1 documentation
The setup script is the centre of all activity in building, distributing, and installing modules using the Distutils. The main purpose of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found