bigdata-ustc / XKT

Multiple Knowledge Tracing models implemented by mxnet
MIT License
19 stars 5 forks source link

numpy version inconsistant (config environment for SKT) #10

Closed zzzz-zzzz closed 3 years ago

zzzz-zzzz commented 3 years ago

win10 conda channels:

1.conda create -n XKT python=3.7 (python-3.7.11) conda activate XKT

  1. cd to project directory XKT-master pip install -e .

Successfully installed PyBaize-0.0.5 PyYAML-6.0 PythonWebHDFS-0.2.3 XKT-0.0.2 astor-0.8.1 chardet-3.0.4 colorama-0.4.4 contextlib2-21.6.0 filelock-3.3.1 fire-0.4.0 future-0.18.2 graphviz-0.8.4 hyperopt-0.1.2 idna-2.6 importlib-metadata-4.8.1 joblib-1.1.0 json-tricks-3.15.5 longling-1.3.32 mxnet-1.7.0.post2 networkx-2.6.3 nni-2.4 numpy-1.16.6 pandas-1.2.5 prettytable-2.2.1 psutil-5.8.0 pymongo-3.12.1 python-dateutil-2.8.2 pytz-2021.3 requests-2.18.4 responses-0.10.15 schema-0.7.4 scikit-learn-1.0 scipy-1.7.1 simplejson-3.17.5 six-1.16.0 termcolor-1.1.0 threadpoolctl-3.0.0 toml-0.10.2 tqdm-4.62.3 typing-extensions-3.10.0.2 urllib3-1.22 wcwidth-0.2.5 websockets-10.0 zipp-3.6.0

cd scripts/SKT python MSKT.py train skt a0910 1 _ImportError: cannot import name 'defaultrng' from 'numpy.random' (d:\anaconda3\envs\XKT\lib\site-packages\numpy\random__init__.py) (numpy-1.16.6 above)

if you update numpy, it's incompatible with mxnet pip install numpy==1.17.5 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. mxnet 1.7.0.post2 requires numpy<1.17.0,>=1.8.2, but you have numpy 1.17.5 which is incompatible.

Can anyone publish the pip_list.txt?Thanks very much.

tswsxk commented 3 years ago

We have not met this problem before, but according to your description, maybe you can try numpy >= 1.8.2

zzzz-zzzz commented 3 years ago

We have not met this problem before, but according to your description, maybe you can try numpy >= 1.8.2

conda --version conda 4.10.1 pip --version pip 21.2.4 from d:\anaconda3\envs\XKT\lib\site-packages\pip (python 3.7) pip install numpy==1.15.4 ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. scipy 1.7.1 requires numpy<1.23.0,>=1.16.5, but you have numpy 1.15.4 which is incompatible. pandas 1.2.5 requires numpy>=1.16.5, but you have numpy 1.15.4 which is incompatible. edudata 0.0.18 requires numpy>=1.16.5, but you have numpy 1.15.4 which is incompatible.

tswsxk commented 3 years ago

Clearly, your problem is resulted by the dependency conflicts between mxnet 1.7.0 which requires numpy<1.17.0,>=1.8.2, scipy which requires numpy<1.23.0,>=1.16.5 and the usage of default_rng which requires numpy>1.16.6 (in fact, it is 1.17.0). Therefore, I might suggest you to use a higher version of mxnet, such as mxnet 1.8.0 to avoid this problem.

zzzz-zzzz commented 3 years ago

pip install mxnet==1.8.0 ERROR: Could not find a version that satisfies the requirement mxnet==1.8.0 (from versions: 0.11.0, 0.12.0, 0.12.1, 1.0.0, 1.0.0.post1, 1.0.0.post3, 1.0.0.post4, 1.1.0.post0, 1.2.0, 1.2.1, 1.2.1.post1, 1.3.0, 1.3.1, 1.4.0, 1.4.0.post0, 1.4.1, 1.5.0, 1.6.0, 1.7.0.post1, 1.7.0.post2) ERROR: No matching distribution found for mxnet==1.8.0

pip install -i http://mirrors.aliyun.com/pypi/simple mxnet==1.8.0 Looking in indexes: http://mirrors.aliyun.com/pypi/simple/ ERROR: Could not find a version that satisfies the requirement mxnet==1.8.0 (from versions: 0.11.0, 0.12.0, 0.12.1, 1.0.0, 1.0.0.post1, 1.0.0.post3, 1.0.0.post4, 1.1.0.post0, 1.2.0, 1.2.1, 1.2.1.post1, 1.3.0, 1.3.1, 1.4.0, 1.4.0.post0, 1.4.1, 1.5.0, 1.6.0, 1.7.0.post1, 1.7.0.post2) ERROR: No matching distribution found for mxnet==1.8.0

tswsxk commented 3 years ago

It seems that you are using a cpu version, which differs from our developing environment. In this case, you can force numpy==1.16.5 . In addition, we are strongly not recommended to use conda as some conflicts may caused by itself.

zzzz-zzzz commented 3 years ago

numpy=1.16.5 or 1.16.6 is ok with the environment pip install -e initially. But the command python MSKT.py train skt a0910 1 in the folder scripts/SKT requires numpy version >=1.17.0 _Traceback (most recent call last): File "MSKT.py", line 5, in from baize import path_append File "d:\anaconda3\envs\XKT\lib\site-packages\baize__init__.py", line 6, in from longling.ML.toolkit.analyser import get_best File "d:\anaconda3\envs\XKT\lib\site-packages\longling\ML\toolkit\init.py", line 4, in from .dataset import * File "d:\anaconda3\envs\XKT\lib\site-packages\longling\ML\toolkit\dataset\init.py", line 11, in from .sampler import * File "d:\anaconda3\envs\XKT\lib\site-packages\longling\ML\toolkit\dataset\sampler\init.py", line 4, in from .pair_sampler import * File "d:\anaconda3\envs\XKT\lib\site-packages\longling\ML\toolkit\dataset\sampler\pair_sampler.py", line 8, in from numpy.random import default_rng ImportError: cannot import name 'default_rng' from 'numpy.random' (d:\anaconda3\envs\XKT\lib\site-packages\numpy\random\init__.py)

Now I'm using numpy==1.17.5 and executing python MSKT.py train skt a0910 1 successfully. Although it's incompatible with mxnet (mxnet 1.7.0.post2 requires numpy<1.17.0)

tswsxk commented 3 years ago

Being incompatible with mxnet seems not affect program executing.

zzzz-zzzz commented 3 years ago

yeah, hopefully mxnet==1.8.0 can support windows10 soon https://pypi.org/project/mxnet/#files https://libraries.io/pypi/mxnet/1.8.0.post0