microsoft / microsoft/qlib

ModuleNotFoundError: No module named 'pyqlib' after install qyqlib package

Open
#1,704 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
48.7k
Forks
7.7k
PR merge metrics
No merged PRs in 30d

Description

🐛 Bug Description

To Reproduce

Steps to reproduce the behavior:

1.(base) C:\Users\a>cd pyqlib
1.(base) C:\Users\a\pyqlib>python -m build
1.(base) C:\Users\a\pyqlib>touch setup.py
(base) C:\Users\a\pyqlib>python -m build

  • Creating venv isolated environment...
  • Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
  • Getting build dependencies for sdist...
    running egg_info
    creating pyqlib.egg-info
    writing pyqlib.egg-info\PKG-INFO
    writing dependency_links to pyqlib.egg-info\dependency_links.txt
    writing top-level names to pyqlib.egg-info\top_level.txt
    writing manifest file 'pyqlib.egg-info\SOURCES.txt'
    reading manifest file 'pyqlib.egg-info\SOURCES.txt'
    writing manifest file 'pyqlib.egg-info\SOURCES.txt'
  • Building sdist...
    running sdist
    running egg_info
    writing pyqlib.egg-info\PKG-INFO
    writing dependency_links to pyqlib.egg-info\dependency_links.txt
    writing top-level names to pyqlib.egg-info\top_level.txt
    reading manifest file 'pyqlib.egg-info\SOURCES.txt'
    writing manifest file 'pyqlib.egg-info\SOURCES.txt'
    warning: sdist: standard file not found: should have one of README, README.rst, README.txt, README.md

running check
creating pyqlib-0.9.3
creating pyqlib-0.9.3\pyqlib.egg-info
copying files to pyqlib-0.9.3...
copying setup.py -> pyqlib-0.9.3
copying pyqlib.egg-info\PKG-INFO -> pyqlib-0.9.3\pyqlib.egg-info
copying pyqlib.egg-info\SOURCES.txt -> pyqlib-0.9.3\pyqlib.egg-info
copying pyqlib.egg-info\dependency_links.txt -> pyqlib-0.9.3\pyqlib.egg-info
copying pyqlib.egg-info\top_level.txt -> pyqlib-0.9.3\pyqlib.egg-info
copying pyqlib.egg-info\SOURCES.txt -> pyqlib-0.9.3\pyqlib.egg-info
Writing pyqlib-0.9.3\setup.cfg
Creating tar archive
removing 'pyqlib-0.9.3' (and everything under it)

  • Building wheel from sdist
  • Creating venv isolated environment...
  • Installing packages in isolated environment... (setuptools >= 40.8.0, wheel)
  • Getting build dependencies for wheel...
    running egg_info
    writing pyqlib.egg-info\PKG-INFO
    writing dependency_links to pyqlib.egg-info\dependency_links.txt
    writing top-level names to pyqlib.egg-info\top_level.txt
    reading manifest file 'pyqlib.egg-info\SOURCES.txt'
    writing manifest file 'pyqlib.egg-info\SOURCES.txt'
  • Installing packages in isolated environment... (wheel)
  • Building wheel...
    running bdist_wheel
    running build
    installing to build\bdist.win-amd64\wheel
    running install
    running install_egg_info
    running egg_info
    writing pyqlib.egg-info\PKG-INFO
    writing dependency_links to pyqlib.egg-info\dependency_links.txt
    writing top-level names to pyqlib.egg-info\top_level.txt
    reading manifest file 'pyqlib.egg-info\SOURCES.txt'
    writing manifest file 'pyqlib.egg-info\SOURCES.txt'
    Copying pyqlib.egg-info to build\bdist.win-amd64\wheel.\pyqlib-0.9.3-py3.10.egg-info
    running install_scripts
    creating build\bdist.win-amd64\wheel\pyqlib-0.9.3.dist-info\WHEEL
    creating 'C:\Users\a\pyqlib\dist.tmp-evrubh2o\pyqlib-0.9.3-py3-none-any.whl' and adding 'build\bdist.win-amd64\wheel' to it
    adding 'pyqlib-0.9.3.dist-info/METADATA'
    adding 'pyqlib-0.9.3.dist-info/WHEEL'
    adding 'pyqlib-0.9.3.dist-info/top_level.txt'
    adding 'pyqlib-0.9.3.dist-info/RECORD'
    removing build\bdist.win-amd64\wheel
    Successfully built pyqlib-0.9.3.tar.gz and pyqlib-0.9.3-py3-none-any.whl

(base) C:\Users\a\pyqlib>pip install dist/pyqlib-0.9.3-py3-none-any.whl
Processing c:\users\a\pyqlib\dist\pyqlib-0.9.3-py3-none-any.whl
Installing collected packages: pyqlib
Successfully installed pyqlib-0.9.3

(base) C:\Users\a\pyqlib>pip install dist/pyqlib-0.9.3-py3-none-any.whl
Processing c:\users\a\pyqlib\dist\pyqlib-0.9.3-py3-none-any.whl
Installing collected packages: pyqlib
Successfully installed pyqlib-0.9.3

(base) C:\Users\a\pyqlib>python
Python 3.10.9 | packaged by Anaconda, Inc. | (main, Mar 1 2023, 18:18:15) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

import qlib
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'qlib'
import pyqlib
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'pyqlib'
print(pyqlib.version)
Traceback (most recent call last):
File "", line 1, in
NameError: name 'pyqlib' is not defined
import pqlib
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'pqlib'
import pyqlib
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'pyqlib'
import pyqlib
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'pyqlib'
pip show pyqlib
File "", line 1
pip show pyqlib
^^^^
SyntaxError: invalid syntax
pip show pyqlib
File "", line 1
pip show pyqlib
^^^^
SyntaxError: invalid syntax
pip show qlib
File "", line 1
pip show qlib
^^^^
SyntaxError: invalid syntax
pip show "pyqlib"
File "", line 1
pip show "pyqlib"
^^^^
SyntaxError: invalid syntax
import sys
print(sys.path)
['', 'C:\Users\a\anaconda3\python310.zip', 'C:\Users\a\anaconda3\DLLs', 'C:\Users\a\anaconda3\lib', 'C:\Users\a\anaconda3', 'C:\Users\a\AppData\Roaming\Python\Python310\site-packages', 'C:\Users\a\anaconda3\lib\site-packages', 'C:\Users\a\anaconda3\lib\site-packages\win32', 'C:\Users\a\anaconda3\lib\site-packages\win32\lib', 'C:\Users\a\anaconda3\lib\site-packages\Pythonwin']
exit()

(base) C:\Users\a\pyqlib>python -m pip show pyqlib
Name: pyqlib
Version: 0.9.3
Summary:
Home-page:
Author:
Author-email:
License:
Location: c:\users\a\anaconda3\lib\site-packages
Requires:
Required-by:

(base) C:\Users\a\pyqlib>conda create -n test python=3.10
Collecting package metadata (current_repodata.json): done
Solving environment: done

==> WARNING: A newer version of conda exists. <==
current version: 23.1.0
latest version: 23.10.0

Please update conda by running

$ conda update -n base -c defaults conda

Or to minimize the number of packages updated during conda update use

 conda install conda=23.10.0

Package Plan

environment location: C:\Users\a\anaconda3\envs\test

added / updated specs:
- python=3.10

The following packages will be downloaded:

package                    |            build
---------------------------|-----------------
ca-certificates-2023.08.22 |       haa95532_0         123 KB
pip-23.3.1                 |  py310haa95532_0         2.9 MB
setuptools-68.0.0          |  py310haa95532_0         934 KB
wheel-0.41.2               |  py310haa95532_0         127 KB
------------------------------------------------------------
                                       Total:         4.0 MB

The following NEW packages will be INSTALLED:

bzip2 pkgs/main/win-64::bzip2-1.0.8-he774522_0
ca-certificates pkgs/main/win-64::ca-certificates-2023.08.22-haa95532_0
libffi pkgs/main/win-64::libffi-3.4.4-hd77b12b_0
openssl pkgs/main/win-64::openssl-3.0.12-h2bbff1b_0
pip pkgs/main/win-64::pip-23.3.1-py310haa95532_0
python pkgs/main/win-64::python-3.10.13-he1021f5_0
setuptools pkgs/main/win-64::setuptools-68.0.0-py310haa95532_0
sqlite pkgs/main/win-64::sqlite-3.41.2-h2bbff1b_0
tk pkgs/main/win-64::tk-8.6.12-h2bbff1b_0
tzdata pkgs/main/noarch::tzdata-2023c-h04d1e81_0
vc pkgs/main/win-64::vc-14.2-h21ff451_1
vs2015_runtime pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
wheel pkgs/main/win-64::wheel-0.41.2-py310haa95532_0
xz pkgs/main/win-64::xz-5.4.2-h8cc25b3_0
zlib pkgs/main/win-64::zlib-1.2.13-h8cc25b3_0

(test) C:\Users\a\pyqlib>pip install dist/pyqlib-0.9.3-py3-none-any.whl
Processing c:\users\a\pyqlib\dist\pyqlib-0.9.3-py3-none-any.whl
Installing collected packages: pyqlib
Successfully installed pyqlib-0.9.3

(test) C:\Users\a\pyqlib>python -c "import pyqlib"
Traceback (most recent call last):
File "", line 1, in
ModuleNotFoundError: No module named 'pyqlib'
(base) C:\Users\a\pyqlib>activate test

(test) C:\Users\a\pyqlib>pip show pyqlib
WARNING: Package(s) not found: pyqlib

(test) C:\Users\a\pyqlib>pip install pyqlib
ERROR: Could not find a version that satisfies the requirement pyqlib (from versions: none)
ERROR: No matching distribution found for pyqlib

(test) C:\Users\a\pyqlib>pip install https://files.pythonhosted.org/packages/b3/f9/321b8ccaacdfe250e27c168bd95f80b1ab90d3d695d033642971130aea90/pyqlib-0.9.3-cp310-cp310-win_amd64.whl
Collecting pyqlib==0.9.3
ERROR: HTTP error 404 while getting https://files.pythonhosted.org/packages/b3/f9/321b8ccaacdfe250e27c168bd95f80b1ab90d3d695d033642971130aea90/pyqlib-0.9.3-cp310-cp310-win_amd64.whl
ERROR: Could not install requirement pyqlib==0.9.3 from https://files.pythonhosted.org/packages/b3/f9/321b8ccaacdfe250e27c168bd95f80b1ab90d3d695d033642971130aea90/pyqlib-0.9.3-cp310-cp310-win_amd64.whl because of HTTP error 404 Client Error: Not Found for url: https://files.pythonhosted.org/packages/b3/f9/321b8ccaacdfe250e27c168bd95f80b1ab90d3d695d033642971130aea90/pyqlib-0.9.3-cp310-cp310-win_amd64.whl for URL https://files.pythonhosted.org/packages/b3/f9/321b8ccaacdfe250e27c168bd95f80b1ab90d3d695d033642971130aea90/pyqlib-0.9.3-cp310-cp310-win_amd64.whl

Expected Behavior

Screenshot

Environment

Note: User could run cd scripts && python collect_info.py all under project directory to get system information
and paste them here directly.

  • Qlib version:pyqlib==0.9.3
  • Python version: python pkgs/main/win-64::python-3.10.13-he1021f5_0
  • OS (Windows, Linux, MacOS): Windows
  • Commit number (optional, please provide it if you are using the dev version):

Additional Notes

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting setup.py and the contents of the wheel produced by python -m build; the report shows that the artifact contains metadata but no importable package. Reproduce the Windows installation and import qlib or import pyqlib checks, then verify that a rebuilt wheel includes the package and imports successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.