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

Import error #259

Closed
bored2020 opened this issue Dec 7, 2021 · 12 comments
Closed

Import error #259

bored2020 opened this issue Dec 7, 2021 · 12 comments
Assignees

Comments

@bored2020
Copy link

When I import abess in each python version I try,such as ( 3.5 3.6 3.7 ) all report the error as follow'

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\envs\cp3710\lib\site-packages\abess\__init__.py", line 9, in <module>
    from abess.linear import abessLogistic, abessLm, abessCox, abessPoisson, abessMultigaussian, abessMultinomial
  File "C:\ProgramData\Anaconda3\envs\cp3710\lib\site-packages\abess\linear.py", line 3, in <module>
    from .bess_base import bess_base
  File "C:\ProgramData\Anaconda3\envs\cp3710\lib\site-packages\abess\bess_base.py", line 7, in <module>
    from abess.cabess import pywrap_abess
  File "C:\ProgramData\Anaconda3\envs\cp3710\lib\site-packages\abess\cabess.py", line 13, in <module>
    from . import _cabess
ImportError: DLL load failed: 找不到指定的模块。

I try all I can find in the web,but not works, cloud anyone can help me .

@bored2020
Copy link
Author

In the jupyter the more detail as follows:


ImportError Traceback (most recent call last)
c:\Users\Administrator\Documents\WeChat Files\g853346463\FileStorage\File\2021-12\luwenwenjian\datasets\huizong\huizong\Breast\abessfenxi.py in
----> 12 import abess

C:\ProgramData\Anaconda3\envs\cp3710\lib\site-packages\abess_init_.py in
7
8 # from abess.linear import PdasLm, PdasLogistic, PdasPoisson, PdasCox, L0L2Lm, L0L2Logistic, L0L2Poisson, L0L2Cox, GroupPdasLm, GroupPdasLogistic, GroupPdasPoisson, GroupPdasCox, abessLogistic
----> 9 from abess.linear import abessLogistic, abessLm, abessCox, abessPoisson, abessMultigaussian, abessMultinomial
10 from abess.pca import abessPCA
11 from abess.datasets import make_glm_data, make_multivariate_glm_data

C:\ProgramData\Anaconda3\envs\cp3710\lib\site-packages\abess\linear.py in
1
2 from abess.metrics import concordance_index_censored
----> 3 from .bess_base import bess_base
4
5 import numpy as np

C:\ProgramData\Anaconda3\envs\cp3710\lib\site-packages\abess\bess_base.py in
5 from sklearn.utils.validation import check_X_y, check_array, check_is_fitted
6 from sklearn.base import BaseEstimator
----> 7 from abess.cabess import pywrap_abess
8
9

C:\ProgramData\Anaconda3\envs\cp3710\lib\site-packages\abess\cabess.py in
11 # Import the low-level C/C++ module
12 if package or "." in name:
---> 13 from . import _cabess
14 else:
15 import _cabess

ImportError: DLL load failed: 找不到指定的模块。

@Mamba413
Copy link
Collaborator

Mamba413 commented Dec 7, 2021

Thanks for your report.

Did the error appear when you tried to install the latest release abess library? If so, please following the guideline (https://abess.readthedocs.io/en/latest/Installation.html) first.

If this problem still occurs, feel free to contact us.

@bored2020
Copy link
Author

Yes, I tried for pyhton3.9 it still report this error,but in python3.8 it's ok.But I have to use some other packages below the python3.8, so I have to ask for help.Thanks a lot.

@Jiang-Kangkang
Copy link
Collaborator

Jiang-Kangkang commented Dec 8, 2021

Yes, I tried for pyhton3.9 it still report this error,but in python3.8 it's ok.But I have to use some other packages below the python3.8, so I have to ask for help.Thanks a lot.

Please show us your detailed platform information at first. And could you show me the install information when you installed abess?

@bored2020
Copy link
Author

I have this platform information

uname_result(system='Windows', node='PC-20211105RHLF', release='10', version='10.0.19041', machine='AMD64', processor='Intel64 Family 6 Model 165 Stepping 3, GenuineIntel')
python version :'3.7.10'

and I pip uninstall abess and install it again,has the following information

(cp3710) C:\Users\Administrator>pip install abess
Collecting abess
  Using cached abess-0.3.0-cp37-cp37m-win_amd64.whl (426 kB)
Requirement already satisfied: sklearn in c:\programdata\anaconda3\envs\cp3710\lib\site-packages (from abess) (0.0)
Requirement already satisfied: scipy in c:\programdata\anaconda3\envs\cp3710\lib\site-packages (from abess) (1.7.3)
Requirement already satisfied: numpy in c:\programdata\anaconda3\envs\cp3710\lib\site-packages (from abess) (1.21.4)
Requirement already satisfied: scikit-learn in c:\programdata\anaconda3\envs\cp3710\lib\site-packages (from sklearn->abess) (1.0.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in c:\programdata\anaconda3\envs\cp3710\lib\site-packages (from scikit-learn->sklearn->abess) (3.0.0)
Requirement already satisfied: joblib>=0.11 in c:\programdata\anaconda3\envs\cp3710\lib\site-packages (from scikit-learn->sklearn->abess) (1.1.0)
Installing collected packages: abess
Successfully installed abess-0.3.0

@bored2020
Copy link
Author

I try to pip install abessin ubantu 20.4 and python 3.7.10,the following error is that

(cp37) root@fengyuqi:/home/fengyuqi/桌面# pip install abess
Collecting abess
  Using cached abess-0.3.0.tar.gz (1.5 MB)
Requirement already satisfied: numpy in /root/anaconda3/envs/cp37/lib/python3.7/site-packages (from abess) (1.21.4)
Requirement already satisfied: scipy in /root/anaconda3/envs/cp37/lib/python3.7/site-packages (from abess) (1.7.3)
Requirement already satisfied: sklearn in /root/anaconda3/envs/cp37/lib/python3.7/site-packages (from abess) (0.0)
Requirement already satisfied: scikit-learn in /root/anaconda3/envs/cp37/lib/python3.7/site-packages (from sklearn->abess) (1.0.1)
Requirement already satisfied: threadpoolctl>=2.0.0 in /root/anaconda3/envs/cp37/lib/python3.7/site-packages (from scikit-learn->sklearn->abess) (3.0.0)
Requirement already satisfied: joblib>=0.11 in /root/anaconda3/envs/cp37/lib/python3.7/site-packages (from scikit-learn->sklearn->abess) (1.1.0)
Building wheels for collected packages: abess
  Building wheel for abess (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /root/anaconda3/envs/cp37/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-akpjgc0_
       cwd: /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/
  Complete output (25 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.7
  creating build/lib.linux-x86_64-3.7/abess
  copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/__init__.py -> build/lib.linux-x86_64-3.7/abess
  copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/bess_base.py -> build/lib.linux-x86_64-3.7/abess
  copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/metrics.py -> build/lib.linux-x86_64-3.7/abess
  copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/datasets.py -> build/lib.linux-x86_64-3.7/abess
  copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/cabess.py -> build/lib.linux-x86_64-3.7/abess
  copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/pca.py -> build/lib.linux-x86_64-3.7/abess
  copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/linear.py -> build/lib.linux-x86_64-3.7/abess
  running build_ext
  building 'abess._cabess' extension
  swigging /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess.i to /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess_wrap.cpp
  swig -python -c++ -o /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess_wrap.cpp /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess.i
  creating build/temp.linux-x86_64-3.7
  creating build/temp.linux-x86_64-3.7/tmp
  creating build/temp.linux-x86_64-3.7/tmp/pip-install-8imd_qlz
  creating build/temp.linux-x86_64-3.7/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d
  creating build/temp.linux-x86_64-3.7/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src
  gcc -pthread -B /root/anaconda3/envs/cp37/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/cp37/lib/python3.7/site-packages/numpy/core/include -I/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/include -I/root/anaconda3/envs/cp37/include/python3.7m -c /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess.cpp -o build/temp.linux-x86_64-3.7/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess.o -DNDEBUG -fopenmp -O2 -Wall -std=c++11 -mavx -mfma -march=native
  unable to execute 'gcc': No such file or directory
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for abess
  Running setup.py clean for abess
Failed to build abess
Installing collected packages: abess
    Running setup.py install for abess ... error
    ERROR: Command errored out with exit status 1:
     command: /root/anaconda3/envs/cp37/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-het7sqlo/install-record.txt --single-version-externally-managed --compile --install-headers /root/anaconda3/envs/cp37/include/python3.7m/abess
         cwd: /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/
    Complete output (25 lines):
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.7
    creating build/lib.linux-x86_64-3.7/abess
    copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/__init__.py -> build/lib.linux-x86_64-3.7/abess
    copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/bess_base.py -> build/lib.linux-x86_64-3.7/abess
    copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/metrics.py -> build/lib.linux-x86_64-3.7/abess
    copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/datasets.py -> build/lib.linux-x86_64-3.7/abess
    copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/cabess.py -> build/lib.linux-x86_64-3.7/abess
    copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/pca.py -> build/lib.linux-x86_64-3.7/abess
    copying /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/abess/linear.py -> build/lib.linux-x86_64-3.7/abess
    running build_ext
    building 'abess._cabess' extension
    swigging /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess.i to /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess_wrap.cpp
    swig -python -c++ -o /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess_wrap.cpp /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess.i
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/tmp
    creating build/temp.linux-x86_64-3.7/tmp/pip-install-8imd_qlz
    creating build/temp.linux-x86_64-3.7/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d
    creating build/temp.linux-x86_64-3.7/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src
    gcc -pthread -B /root/anaconda3/envs/cp37/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/root/anaconda3/envs/cp37/lib/python3.7/site-packages/numpy/core/include -I/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/include -I/root/anaconda3/envs/cp37/include/python3.7m -c /tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess.cpp -o build/temp.linux-x86_64-3.7/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/src/abess.o -DNDEBUG -fopenmp -O2 -Wall -std=c++11 -mavx -mfma -march=native
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /root/anaconda3/envs/cp37/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8imd_qlz/abess_dad0834023ff4868b5f51d211bd1f15d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-het7sqlo/install-record.txt --single-version-externally-managed --compile --install-headers /root/anaconda3/envs/cp37/include/python3.7m/abess Check the logs for full command output.

I try to figure it out by myself but I can't ,thanks for yours help.

@bored2020
Copy link
Author

Finally solve this problem in my windows computer,it may because I don't have MinGW-w64 in my path,but in pip install abess there is no error report,may be can put the MinGW-w64 in the requirement.

Thanks for both of you ,thanks a lot.

@Mamba413
Copy link
Collaborator

Mamba413 commented Dec 8, 2021

Finally solve this problem in my windows computer,it may because I don't have MinGW-w64 in my path,but in pip install abess there is no error report,may be can put the MinGW-w64 in the requirement.

Thanks for both of you ,thanks a lot.

Congratulation! You solve this problem by yourself before we exactly reproduce the error appeared in your personal computer. We are very appreciate for your suggestion, and we may include your suggestion into our documentation.

BTW, why you install abess from our source code? You are going to develop novel new features?

@bored2020
Copy link
Author

Thanks,but I want to use the abess method to solve some real problem by now,but because I don't use the C and C++well,I want to develop some features it's diffcult for me ,but I try to make it.

@Mamba413
Copy link
Collaborator

Thanks,but I want to use the abess method to solve some real problem by now,but because I don't use the C and C++well,I want to develop some features it's diffcult for me ,but I try to make it.

Thanks for your response. If you still have any question when developing code, please feel free to contact us.

@Mamba413
Copy link
Collaborator

Hi, we have fixed this issue in version 0.4.0. We expect this package can be installed via pip install abess in Windows platform. @bored2020

@bored2020
Copy link
Author

bored2020 commented Jan 23, 2022 via email

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