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

how to install the alphacsc on anaconda? #30

Open
oneway3124 opened this issue Dec 2, 2020 · 19 comments
Open

how to install the alphacsc on anaconda? #30

oneway3124 opened this issue Dec 2, 2020 · 19 comments

Comments

@oneway3124
Copy link

I cannot use the command
pip install numpy cython
pip install alphacsc

Why?

@jasmainak
Copy link
Member

can you share what happened when you ran those commands? If you don't tell us more, it is hard to help

@oneway3124
Copy link
Author

My command line environment is the anaconda.

After I created the alphacsc virtual conda environment by running "conda create -n alphacsc", I used the following command:
pip install numpy cython
pip install alphacsc

(base) PS C:\WINDOWS\system32> conda activate alphacsc
(alphacsc) PS C:\WINDOWS\system32>

(alphacsc) PS C:\WINDOWS\system32> pip install numpy cython
Requirement already satisfied: numpy in c:\users\davwang\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (1.17.3)
Requirement already satisfied: cython in c:\users\davwang\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (0.29.2)
(alphacsc) PS C:\WINDOWS\system32>

(alphacsc) PS C:\WINDOWS\system32> pip install alphacsc
Collecting alphacsc
Using cached alphacsc-0.2.2.tar.gz (5.6 MB)
Installing build dependencies ... done
** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: 'C:\Users\davwang\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Users\davwang\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\davwang\AppData\Local\Temp\tmpsr730two'
cwd: C:\Users\davwang\AppData\Local\Temp\pip-install-zgcvrh58\alphacsc
Complete output (22 lines):
Traceback (most recent call last):
File "C:\Users\davwang\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip_vendor\pep517_in_process.py", line 280, in
main()
File "C:\Users\davwang\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip_vendor\pep517_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\Users\davwang\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip_vendor\pep517_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-hzm95b8s\overlay\Lib\site-packages\setuptools\build_meta.py", line 149, in get_requires_for_build_wheel
return self._get_build_requires(
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-hzm95b8s\overlay\Lib\site-packages\setuptools\build_meta.py", line 130, in _get_build_requires
self.run_setup()
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-hzm95b8s\overlay\Lib\site-packages\setuptools\build_meta.py", line 253, in run_setup
super(BuildMetaLegacyBackend,
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-hzm95b8s\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 2, in
import numpy as np
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-hzm95b8s\overlay\Lib\site-packages\numpy_init
.py", line 305, in
win_os_check()
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-hzm95b8s\overlay\Lib\site-packages\numpy_init
.py", line 302, in _win_os_check
raise RuntimeError(msg.format(file)) from None
RuntimeError: The current Numpy installation ('C:\Users\davwang\AppData\Local\Temp\pip-build-env-hzm95b8s\overlay\Lib\site-packages\numpy\init.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86

ERROR: Command errored out with exit status 1: 'C:\Users\davwang\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\python.exe' 'C:\Users\davwang\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\davwang\AppData\Local\Temp\tmpsr730two' Check the logs for full command output.
(alphacsc) PS C:\WINDOWS\system32>

@jasmainak
Copy link
Member

It seems to be an issue with numpy. Can you try installing it separately and then install alphacsc again?

@jasmainak
Copy link
Member

try using the --no-deps flag when installing alphacsc

@oneway3124
Copy link
Author

(base) PS C:\WINDOWS\system32> pip install alphacsc --no-deps
Collecting alphacsc
Using cached alphacsc-0.2.2.tar.gz (5.6 MB)
Installing build dependencies ... done
** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
Getting requirements to build wheel ... error
ERROR: Command errored out with exit status 1:
command: 'C:\ProgramData\Anaconda3\python.exe' 'C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\davwang\AppData\Local\Temp\tmprb7backf'
cwd: C:\Users\davwang\AppData\Local\Temp\pip-install-_ailw1uq\alphacsc
Complete output (22 lines):
Traceback (most recent call last):
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py", line 280, in
main()
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py", line 263, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py", line 114, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-1llm_e84\overlay\Lib\site-packages\setuptools\build_meta.py", line 149, in get_requires_for_build_wheel
return self._get_build_requires(
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-1llm_e84\overlay\Lib\site-packages\setuptools\build_meta.py", line 130, in _get_build_requires
self.run_setup()
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-1llm_e84\overlay\Lib\site-packages\setuptools\build_meta.py", line 253, in run_setup
super(BuildMetaLegacyBackend,
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-1llm_e84\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in run_setup
exec(compile(code, file, 'exec'), locals())
File "setup.py", line 2, in
import numpy as np
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-1llm_e84\overlay\Lib\site-packages\numpy_init
.py", line 305, in
win_os_check()
File "C:\Users\davwang\AppData\Local\Temp\pip-build-env-1llm_e84\overlay\Lib\site-packages\numpy_init
.py", line 302, in _win_os_check
raise RuntimeError(msg.format(file)) from None
RuntimeError: The current Numpy installation ('C:\Users\davwang\AppData\Local\Temp\pip-build-env-1llm_e84\overlay\Lib\site-packages\numpy\init.py') fails to pass a sanity check due to a bug in the windows runtime. See this issue for more information: https://tinyurl.com/y3dm3h86

ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' 'C:\ProgramData\Anaconda3\lib\site-packages\pip_vendor\pep517_in_process.py' get_requires_for_build_wheel 'C:\Users\davwang\AppData\Local\Temp\tmprb7backf' Check the logs for full command output.
(base) PS C:\WINDOWS\system32>

@oneway3124
Copy link
Author

I have installed numpy and cython, and have tried "try using the --no-deps flag when installing alphacsc". The errors are still there.

@tomMoral
Copy link
Contributor

tomMoral commented Dec 3, 2020

Hello,

It seems to be a numpy issue, see the information on the URL provided in the link at the end of the traceback.
A quick scan through it seems to show that:

  • If you are encountering this issue specifically via NumPy/OpenBLAS, please use the NumPy version 1.19.3.

Could you try this fix?

@oneway3124
Copy link
Author

I use conda search numpy

numpy 1.19.1 py37hae9e721_0 conda-forge
numpy 1.19.1 py38h5510c5b_0 pkgs/main
numpy 1.19.1 py38h72c728b_0 conda-forge
numpy 1.19.2 py36h12ee977_1 conda-forge
numpy 1.19.2 py36hadc3359_0 pkgs/main
numpy 1.19.2 py36hc5bf2d3_1 conda-forge
numpy 1.19.2 py37h7cee19a_1 conda-forge
numpy 1.19.2 py37hadc3359_0 pkgs/main
numpy 1.19.2 py37he804e03_1 conda-forge
numpy 1.19.2 py38hadc3359_0 pkgs/main
numpy 1.19.2 py38hdf1ac2f_0 conda-forge
numpy 1.19.2 py38hdf1ac2f_1 conda-forge
numpy 1.19.2 py39h5659d19_1 conda-forge
numpy 1.19.2 py39h862d380_1 conda-forge
numpy 1.19.4 py36hd1b969e_0 conda-forge
numpy 1.19.4 py36hd1b969e_1 conda-forge
numpy 1.19.4 py37hd20adf4_0 conda-forge
numpy 1.19.4 py37hd20adf4_1 conda-forge
numpy 1.19.4 py38h0cc643e_0 conda-forge
numpy 1.19.4 py38h0cc643e_1 conda-forge
numpy 1.19.4 py39h6635163_0 conda-forge
numpy 1.19.4 py39h6635163_1 conda-forge

There is no Numpy version 1.19.3, so I installed version 1.19.4.
Then
(base) PS C:\WINDOWS\system32> pip install alphacsc --no-deps

The error is still there.

About your answer about "...NumPy/OpenBLAS...", I have no practical experience about it, so I use the anaconda environment which is good for me .

@agramfort
Copy link
Collaborator

agramfort commented Dec 4, 2020 via email

@oudre
Copy link

oudre commented Dec 18, 2020

Hello,

It seems to be a numpy issue, see the information on the URL provided in the link at the end of the traceback.
A quick scan through it seems to show that:

  • If you are encountering this issue specifically via NumPy/OpenBLAS, please use the NumPy version 1.19.3.

Could you try this fix?

I have the same problem : I tried using 1.19.3 and I get the same error :(

@jasmainak
Copy link
Member

Did you try this. I just installed aphacsc from within the MNE environment and it worked like a breeze

@oudre
Copy link

oudre commented Dec 19, 2020

Unfortunately I tried it with the MNE environment and I still get the same error :(

@tomMoral
Copy link
Contributor

tomMoral commented Dec 20, 2020

As python3.9 is being release, with also newer version of numpy and wheels not availlable for all version, it seems that we might update the pacakge to make it compliant with all versions.

In the mean time, I managed to install alphacsc in a new env with the following steps:

conda create -n alphacsc python==3.8.6 numpy numba cython
conda activate alphacsc
pip install alphacsc

also, if you could report the version of python/numpy/numba for which you have experienced failures, as well as the OS you are working with, it would be super helpful to allow us to fix it.

@oudre
Copy link

oudre commented Dec 21, 2020

Hi Thomas
I'm using Windows 10 Professional version 19041.685

Up to now, none of the configurations have worked :

base: (early tests)
numpy 1.19.3 (not working with 1.19.4 either)
numba 0.45.1
python 3.6.8

mne: (suggested by Alex)
numpy 1.19.4
numba 0.52.0
python 3.6.8

fresh: (suggested by you)
numpy 1.19.2
numba 0.51.2
python 3.6.8

@Jixun97
Copy link

Jixun97 commented Apr 7, 2022

How to solve 'Building wheel for alphacsc (pyproject.toml) ... error' ?

@agramfort
Copy link
Collaborator

agramfort commented Apr 7, 2022 via email

@tomMoral
Copy link
Contributor

tomMoral commented Apr 7, 2022

I guess the issue here is that you are working on windows? if yes, the issue is that you need to have access to a compiler to install this package.
We will soon make a release with pre-compiled wheel to fix this. We hope to make this happen very soon.

@Jixun97
Copy link

Jixun97 commented Apr 8, 2022

I guess the issue here is that you are working on windows? if yes, the issue is that you need to have access to a compiler to install this package. We will soon make a release with pre-compiled wheel to fix this. We hope to make this happen very soon.

Thanks for your reply, I installed alphacsc successfully by installing the .whl file. According to pip .whl file directly, it will be successfully on windows.

@tomMoral
Copy link
Contributor

tomMoral commented Apr 8, 2022

thanks for the feedback.

just a small question, where did you find the .whl file? I though they where not yet available.

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

6 participants