Error: Cannot import pyroomacoustics in Anaconda prompt - python

I'm trying to import pyroomacoustics into my anconda prompt like this.
pip install pyroomacoustics
But some error happens and pyroomacoustics is not able to be instaled.
(py310) C:\Users\xxx>pip install pyroomacoustics
Collecting pyroomacoustics
Using cached pyroomacoustics-0.6.0.tar.gz (1.1 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: scipy>=0.18.0 in c:\users\xxx\.conda\envs\py310\lib\site-packages (from pyroomacoustics) (1.7.3)
Requirement already satisfied: numpy in c:\users\xxx\.conda\envs\py310\lib\site-packages (from pyroomacoustics) (1.21.5)
Collecting pybind11>=2.2
Using cached pybind11-2.10.0-py3-none-any.whl (213 kB)
Collecting Cython
Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Building wheels for collected packages: pyroomacoustics
Building wheel for pyroomacoustics (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for pyroomacoustics (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [3164 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-310
creating build\lib.win-amd64-cpython-310\pyroomacoustics
copying pyroomacoustics\acoustics.py -> build\lib.win-amd64-cpython-310\pyroomacoustics
.......
omission
......
C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.20.27508\include\type_traits(590): note: see reference to class template instantiation 'Microphone<2>' being compiled
C:\Users\xxx\AppData\Local\Temp\pip-build-env-_qv711e4\overlay\Lib\site-packages\pybind11\include\pybind11/pybind11.h(1499): note: see reference to class template instantiation 'std::is_polymorphic<type_>' being compiled
with
[
type_=Microphone<2>
]
pyroomacoustics/libroom_src\libroom.cpp(246): note: see reference to class template instantiation 'pybind11::class_<Microphone<2>>' being compiled
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Tools\\MSVC\\14.20.27508\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pyroomacoustics
Failed to build pyroomacoustics
ERROR: Could not build wheels for pyroomacoustics, which is required to install pyproject.toml-based projects
Because the limitation of number of characters, I omitted the message. Please tell me if you need another information.
Would you please help me to install the module?

Related

How to fix secp256k1 error while installing sawtooth-sdk python in Windows 10

C:\Users\akhilesh.s>pip install sawtooth-sdk
Collecting sawtooth-sdk
Using cached sawtooth_sdk-1.2.5-py3-none-any.whl (97 kB)
Requirement already satisfied: colorlog in c:\users\akhilesh.s\appdata\local\programs\python\python311\lib\site-packages (from sawtooth-sdk) (6.7.0)
Requirement already satisfied: protobuf in c:\users\akhilesh.s\appdata\local\programs\python\python311\lib\site-packages (from sawtooth-sdk) (4.21.12)
Requirement already satisfied: pyzmq in c:\users\akhilesh.s\appdata\local\programs\python\python311\lib\site-packages (from sawtooth-sdk) (25.0.0)
Collecting secp256k1
Using cached secp256k1-0.14.0.tar.gz (2.4 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: toml in c:\users\akhilesh.s\appdata\local\programs\python\python311\lib\site-packages (from sawtooth-sdk) (0.10.2)
Requirement already satisfied: PyYAML in c:\users\akhilesh.s\appdata\local\programs\python\python311\lib\site-packages (from sawtooth-sdk) (6.0)
Requirement already satisfied: colorama in c:\users\akhilesh.s\appdata\local\programs\python\python311\lib\site-packages (from colorlog->sawtooth-sdk) (0.4.6)
Requirement already satisfied: cffi>=1.3.0 in c:\users\akhilesh.s\appdata\local\programs\python\python311\lib\site-packages (from secp256k1->sawtooth-sdk) (1.15.1)
Requirement already satisfied: pycparser in c:\users\akhilesh.s\appdata\local\programs\python\python311\lib\site-packages (from cffi>=1.3.0->secp256k1->sawtooth-sdk) (2.21)
Building wheels for collected packages: secp256k1
Building wheel for secp256k1 (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
0.26
C:\Users\akhilesh.s\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
Using bundled libsecp256k1
running bdist_wheel
The [wheel] section is deprecated. Use [bdist_wheel] instead.
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\secp256k1
copying secp256k1\__init__.py -> build\lib.win-amd64-cpython-311\secp256k1
copying secp256k1\__main__.py -> build\lib.win-amd64-cpython-311\secp256k1
running build_clib
Building experimental
error: [WinError 193] %1 is not a valid Win32 application
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for secp256k1
Running setup.py clean for secp256k1
Failed to build secp256k1
Installing collected packages: secp256k1, sawtooth-sdk
Running setup.py install for secp256k1 ... error
error: subprocess-exited-with-error
× Running setup.py install for secp256k1 did not run successfully.
│ exit code: 1
╰─> [17 lines of output]
0.26
C:\Users\akhilesh.s\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated.
Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
Using bundled libsecp256k1
running install
C:\Users\akhilesh.s\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\secp256k1
copying secp256k1\__init__.py -> build\lib.win-amd64-cpython-311\secp256k1
copying secp256k1\__main__.py -> build\lib.win-amd64-cpython-311\secp256k1
running build_clib
Building experimental
error: [WinError 193] %1 is not a valid Win32 application
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> secp256k1
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
output-image-1
output-image-2
While installing sawtooth-sdk from "pip install sawtooth-sdk", encountered "pkg-config" error.
Pycharm error 'pkg-config' is required to install this package on Windows
Its resolved.
Later encountered secp256k1 error. Even installed Microsoft C++ build tools, still found this "secp256k1" error. Also tried with python 3.9 version getting same error . Can anyone share the fix?

How to resolve error, "legacy-install-failure" when installing package pysha3 in PyCharm using python 3.11 on windows?

I'm pretty new to programming in python, and the reason why I am using or have been learning python as of now is to complete an assignment. However, when downloading a source code and attempting to use it, I encountered errors that I cannot resolve. The source code is from this website "https://github.com/ZeroProphet/klefki#readme. If anyone can help me with this problem, that would be great.
I tried updating the pip version and even doing a specific step-by-step installation of the package in PyCharm. I expect it to be downloaded successfully, but it keeps stating that it cannot build the wheel for pysha3 and legacy-install-failure. If anything, try running this program and see if you're experiencing similar issues.
This error is shown when I attempt to run the program:
Collecting pyasn1==0.3.7
Using cached pyasn1-0.3.7-py2.py3-none-any.whl (63 kB)
Collecting base58==0.2.5
Using cached base58-0.2.5-py3-none-any.whl (4.1 kB)
Collecting asn1ate==0.6.0
Using cached asn1ate-0.6.0-py3-none-any.whl (29 kB)
Collecting pysha3==1.0.2
Using cached pysha3-1.0.2.tar.gz (829 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Collecting flatbuffers==1.12
Using cached flatbuffers-1.12-py2.py3-none-any.whl (15 kB)
Collecting pyparsing>=2.0.0
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Building wheels for collected packages: pysha3
Building wheel for pysha3 (setup.py): started
Building wheel for pysha3 (setup.py): finished with status 'error'
Running setup.py clean for pysha3
Failed to build pysha3
Installing collected packages: pysha3, pyasn1, flatbuffers, base58, pyparsing, asn1ate
Running setup.py install for pysha3: started
Running setup.py install for pysha3: finished with status 'error'
error: subprocess-exited-with-error
python setup.py bdist_wheel did not run successfully.
exit code: 1
[9 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
copying sha3.py -> build\lib.win-amd64-cpython-311
running build_ext
building '_pysha3' extension
error: 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: Failed building wheel for pysha3
**error: subprocess-exited-with-error**
Running setup.py install for pysha3 did not run successfully.
exit code: 1
[11 lines of output]
running install
C:\Users\sxmfc\Downloads\klefki-master\venv\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
copying sha3.py -> build\lib.win-amd64-cpython-311
running build_ext
building '_pysha3' extension
error: 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: legacy-install-failure**
Encountered error while trying to install package.
pysha3
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.```

No module named 'social_django'

I have installed django and tried running the below command
pip install social-auth-app-django
But am still getting an error while installing the social auth.
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [41 lines of output]
Collecting setuptools!=60.9.0,>=40.6.0
Using cached setuptools-65.5.0-py3-none-any.whl (1.2 MB)
Collecting wheel
Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
Collecting cffi>=1.12
Using cached cffi-1.15.1.tar.gz (508 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
I have searched on net, but not able to get a solution.
Any help is appreciated!!

Can not install async-sqlalchemy on Mac (fatal error: 'Python.h' file not found #include "Python.h")

I am trying to install async-sqlalchemy in virtual environment but get an error during the installation of asyncpg package.
I have reinstalled python, made homebrew upgrade, but it did not helped.
Other inputs:
macOS Monterey 12.4
Apple M1 Max
python was installed using homebrew
headers location: /opt/homebrew/Frameworks/Python.framework/Headers/Python.h
Python 3.8.9 installed in virtual environment
Text of error:
(venv) ➜ project1 git:(main) ✗ pip install async-sqlalchemy
pip install async-sqlalchemy
Collecting async-sqlalchemy
Using cached async_sqlalchemy-1.0.0-py3-none-any.whl (2.1 kB)
Collecting sqlalchemy
Using cached SQLAlchemy-1.4.40.tar.gz (8.3 MB)
Preparing metadata (setup.py) ... done
Collecting asyncpg
Using cached asyncpg-0.26.0.tar.gz (809 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting aiomysql
Using cached aiomysql-0.1.1-py3-none-any.whl (43 kB)
Collecting PyMySQL>=1.0
Using cached PyMySQL-1.0.2-py3-none-any.whl (43 kB)
Building wheels for collected packages: asyncpg, sqlalchemy
Building wheel for asyncpg (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for asyncpg (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
running bdist_wheel
running build
running build_py
running build_ext
building 'asyncpg.pgproto.pgproto' extension
asyncpg/pgproto/pgproto.c:31:10: fatal error: 'Python.h' file not found
#include "Python.h"
^~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for asyncpg
Building wheel for sqlalchemy (setup.py) ... done
Created wheel for sqlalchemy: filename=SQLAlchemy-1.4.40-cp38-cp38-macosx_10_14_arm64.whl size=1563095 sha256=dec89820eeaacf37173105593f3bd9762e66d86bec9d058b6e16a2a6b0905467
Stored in directory: /Users/[user_name deleted_intentionally]/Library/Caches/pip/wheels/b6/24/79/b40cf000cb96fbda45242a556ce18006f8ca34712487c09a90
Successfully built sqlalchemy
Failed to build asyncpg
I was facing the same issue and had a lot of research. Finally found the problem in my other python project
source venv/bin/activate
was active. So I have deactivated from another project and then re-run the installation again.

Failed building wheel for minepy

I'm using windows 10 and Python 3.8.10. When I try to install minepy module via "pip install minepy", I get an error as following:
pip install minepy
C:\Users\sotka>pip install minepy
Collecting minepy
Using cached minepy-1.2.6.tar.gz (496 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: numpy>=1.3.0 in c:\users\sotka\appdata\local\packages\pythonsoftwarefoundation.python.3.8_qbz5n2kfra8p0\localcache\local-packages\python38\site-packages (from minepy) (1.18.1)
Building wheels for collected packages: minepy
Building wheel for minepy (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [10 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-38
creating build\lib.win-amd64-cpython-38\minepy
copying minepy\__init__.py -> build\lib.win-amd64-cpython-38\minepy
running build_ext
building 'minepy.mine' extension
error: [WinError 2] The system cannot find the file specified
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for minepy
Running setup.py clean for minepy
Failed to build minepy
Installing collected packages: minepy
Running setup.py install for minepy ... error
error: subprocess-exited-with-error
× Running setup.py install for minepy did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
running install
C:\Users\sotka\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-38
creating build\lib.win-amd64-cpython-38\minepy
copying minepy\__init__.py -> build\lib.win-amd64-cpython-38\minepy
running build_ext
building 'minepy.mine' extension
error: [WinError 2] The system cannot find the file specified
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> minepy
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
What I have already tried:
updated pip, python
updated visual studio build tools
manually installed the module by copying the files to where the other modules are
manually downloaded unofficial minepy module and installed
No luck so far. I'd use some help. Thanks in advance

Categories