ghammad / pyActigraphy

Python-based open source package for actigraphy data analysis

Home Page:https://ghammad.github.io/pyActigraphy

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The package installation does not work in anaconda/spyder

jeffersoncrono opened this issue · comments

This is the error message: Requirement already satisfied: pyactigraphy in c:\users\jefferson\anaconda3\lib\site-packages\pyactigraphy-1.2.1-py3.11.egg (1.2.1)
Requirement already satisfied: joblib in c:\users\jefferson\anaconda3\lib\site-packages (from pyactigraphy) (1.2.0)
Requirement already satisfied: lmfit in c:\users\jefferson\anaconda3\lib\site-packages\lmfit-1.2.2-py3.11.egg (from pyactigraphy) (1.2.2)
Requirement already satisfied: pandas in c:\users\jefferson\anaconda3\lib\site-packages (from pyactigraphy) (1.5.3)
Requirement already satisfied: plotly in c:\users\jefferson\anaconda3\lib\site-packages (from pyactigraphy) (5.9.0)
Requirement already satisfied: numba in c:\users\jefferson\anaconda3\lib\site-packages (from pyactigraphy) (0.57.0)
Requirement already satisfied: numpy in c:\users\jefferson\anaconda3\lib\site-packages (from pyactigraphy) (1.24.3)
Requirement already satisfied: pyexcel in c:\users\jefferson\anaconda3\lib\site-packages\pyexcel-0.7.0-py3.11.egg (from pyactigraphy) (0.7.0)
Requirement already satisfied: pyexcel-ods3 in c:\users\jefferson\anaconda3\lib\site-packages\pyexcel_ods3-0.6.1-py3.11.egg (from pyactigraphy) (0.6.1)
Requirement already satisfied: pyexcel-xlsx in c:\users\jefferson\anaconda3\lib\site-packages\pyexcel_xlsx-0.6.0-py3.11.egg (from pyactigraphy) (0.6.0)
Requirement already satisfied: scipy in c:\users\jefferson\anaconda3\lib\site-packages (from pyactigraphy) (1.10.1)
Requirement already satisfied: spm1d in c:\users\jefferson\anaconda3\lib\site-packages\spm1d-0.4.21-py3.11.egg (from pyactigraphy) (0.4.21)
Requirement already satisfied: statsmodels>=0.10 in c:\users\jefferson\anaconda3\lib\site-packages (from pyactigraphy) (0.14.0)
Requirement already satisfied: stochastic>=0.6.0 in c:\users\jefferson\anaconda3\lib\site-packages\stochastic-0.7.0-py3.11.egg (from pyactigraphy) (0.7.0)
Requirement already satisfied: accelerometer>=6.2.2 in c:\users\jefferson\anaconda3\lib\site-packages\accelerometer-7.0.1-py3.11.egg (from pyactigraphy) (7.0.1)
Collecting numpy (from pyactigraphy)
Using cached numpy-1.21.1.zip (10.3 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'done'
INFO: pip is looking at multiple versions of accelerometer to determine which version is compatible with other requirements. This could take a while.
Collecting accelerometer>=6.2.2 (from pyactigraphy)
Using cached accelerometer-6.2.3-py3-none-any.whl (1.5 MB)
Requirement already satisfied: matplotlib in c:\users\jefferson\anaconda3\lib\site-packages (from accelerometer>=6.2.2->pyactigraphy) (3.7.1)
Requirement already satisfied: tqdm>=4.59.0 in c:\users\jefferson\anaconda3\lib\site-packages (from accelerometer>=6.2.2->pyactigraphy) (4.65.0)
Collecting imbalanced-learn==0.8.1 (from accelerometer>=6.2.2->pyactigraphy)
Using cached imbalanced_learn-0.8.1-py3-none-any.whl (189 kB)
Collecting scikit-learn==1.0.1 (from accelerometer>=6.2.2->pyactigraphy)
Using cached scikit-learn-1.0.1.tar.gz (6.6 MB)
Installing build dependencies: started
Installing build dependencies: still running...
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
Note: you may need to restart the kernel to use updated packages.
DEPRECATION: Loading egg at c:\users\jefferson\anaconda3\lib\site-packages\accelerometer-7.0.1-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
DEPRECATION: Loading egg at c:\users\jefferson\anaconda3\lib\site-packages\lmfit-1.2.2-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
DEPRECATION: Loading egg at c:\users\jefferson\anaconda3\lib\site-packages\pyactigraphy-1.2.1-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
DEPRECATION: Loading egg at c:\users\jefferson\anaconda3\lib\site-packages\pyexcel-0.7.0-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
DEPRECATION: Loading egg at c:\users\jefferson\anaconda3\lib\site-packages\pyexcel_ods3-0.6.1-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
DEPRECATION: Loading egg at c:\users\jefferson\anaconda3\lib\site-packages\pyexcel_xlsx-0.6.0-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
DEPRECATION: Loading egg at c:\users\jefferson\anaconda3\lib\site-packages\spm1d-0.4.21-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
DEPRECATION: Loading egg at c:\users\jefferson\anaconda3\lib\site-packages\stochastic-0.7.0-py3.11.egg is deprecated. pip 23.3 will enforce this behaviour change. A possible replacement is to use pip for package installation..
error: subprocess-exited-with-error

Preparing metadata (pyproject.toml) did not run successfully.
exit code: 1

[61 lines of output]
Partial import of sklearn during the build process.
:128: DeprecationWarning:

`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
  https://numpy.org/devdocs/reference/distutils_status_migration.html

INFO: No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
Traceback (most recent call last):
File "C:\Users\Jefferson\Anaconda3\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users\Jefferson\Anaconda3\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jefferson\Anaconda3\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jefferson\AppData\Local\Temp\pip-build-env-5hy0m46w\overlay\Lib\site-packages\setuptools\build_meta.py", line 396, in prepare_metadata_for_build_wheel
self.run_setup()
File "C:\Users\Jefferson\AppData\Local\Temp\pip-build-env-5hy0m46w\overlay\Lib\site-packages\setuptools\build_meta.py", line 507, in run_setup
super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script)
File "C:\Users\Jefferson\AppData\Local\Temp\pip-build-env-5hy0m46w\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in run_setup
exec(code, locals())
File "", line 319, in
File "", line 315, in setup_package
File "C:\Users\Jefferson\AppData\Local\Temp\pip-build-env-5hy0m46w\overlay\Lib\site-packages\numpy\distutils\core.py", line 135, in setup
config = configuration()
^^^^^^^^^^^^^^^
File "", line 201, in configuration
File "C:\Users\Jefferson\AppData\Local\Temp\pip-build-env-5hy0m46w\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 1050, in add_subpackage
config_list = self.get_subpackage(subpackage_name, subpackage_path,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jefferson\AppData\Local\Temp\pip-build-env-5hy0m46w\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 1016, in get_subpackage
config = self._get_configuration_from_setup_py(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jefferson\AppData\Local\Temp\pip-build-env-5hy0m46w\overlay\Lib\site-packages\numpy\distutils\misc_util.py", line 958, in get_configuration_from_setup_py
config = setup_module.configuration(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jefferson\AppData\Local\Temp\pip-install-yiq1e04a\scikit-learn_af63e5f8b0f7437cac5afe149a8320de\sklearn\setup.py", line 85, in configuration
cythonize_extensions(top_path, config)
File "C:\Users\Jefferson\AppData\Local\Temp\pip-install-yiq1e04a\scikit-learn_af63e5f8b0f7437cac5afe149a8320de\sklearn_build_utils_init
.py", line 47, in cythonize_extensions
basic_check_build()
File "C:\Users\Jefferson\AppData\Local\Temp\pip-install-yiq1e04a\scikit-learn_af63e5f8b0f7437cac5afe149a8320de\sklearn_build_utils\pre_build_helpers.py", line 113, in basic_check_build
compile_test_program(code)
File "C:\Users\Jefferson\AppData\Local\Temp\pip-install-yiq1e04a\scikit-learn_af63e5f8b0f7437cac5afe149a8320de\sklearn_build_utils\pre_build_helpers.py", line 70, in compile_test_program
ccompiler.compile(
File "C:\Users\Jefferson\AppData\Local\Temp\pip-build-env-5hy0m46w\overlay\Lib\site-packages\setuptools_distutils_msvccompiler.py", line 343, in compile
self.initialize()
File "C:\Users\Jefferson\AppData\Local\Temp\pip-build-env-5hy0m46w\overlay\Lib\site-packages\setuptools_distutils_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jefferson\AppData\Local\Temp\pip-build-env-5hy0m46w\overlay\Lib\site-packages\setuptools\msvc.py", line 233, in msvc14_get_vc_env
return _msvc14_get_vc_env(plat_spec)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Jefferson\AppData\Local\Temp\pip-build-env-5hy0m46w\overlay\Lib\site-packages\setuptools\msvc.py", line 190, in _msvc14_get_vc_env
raise distutils.errors.DistutilsPlatformError("Unable to find vcvarsall.bat")
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

Encountered error while generating package metadata.

See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Hello @jeffersoncrono

Thanks for using (or trying to use :-)) pyActigraphy.

If I read your output message correctly, the issue originates from nupmy/scikit-learn. These are dependencies of pyActigraphy. However, there are pretty standard packages and most environments do already have these packages installed. The problem is that this issue is likely to be linked to your OS, its configuration, etc...

I can only suggest that you try to install these packages before installing pyActigraphy. Maybe you will get a more meaningful error message that will allow you to search for a specific solution.

Anyway, if you have made progress, do not hesitate to share your solution with us.

Cheers,

Greg

Hello @jeffersoncrono

any success in installing numpy/scikit-learn?

Do not hesitate to share your findings/solutions.

Greg

I am getting the same error message as OP (using miniconda), and I installed numpy and scikit-learn with no change in the error message. I downloaded the visual studio C++ build tools linked toward the end of the message, and now I am getting a longer error message but still ultimately fails for the same stated reason (metadata generation failed).

Hi again - had some success. I tried starting over by downloading python and VS code (instead of miniconda route) and encountered the same error messages as before. But then I started reading this thread (scikit-learn/scikit-learn#26858) and tried an older version of cython, then an older python (3.11.6), then finally an even older python (3.10.11) and I was able to install pyActigraphy successfully (without needing an older cython in my env, just python 3.10.11 in a venv in vs code). No idea if this would have worked eventually with anaconda/miniconda had I gotten an older version of python initially. Hope this helps!

Hello @ghammad I quit my work in Anaconda/Spyder, but I have been working successfully using Jupyter Notebook.