Python Forum
librosa ERROR: Command errored out with exit status 1:
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
librosa ERROR: Command errored out with exit status 1:
#1
Fairly new to Python and data science. Working with audio.

If I type in:

Quote:pip install librosa


Error is longer than below:

Quote:Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python38-32\python.exe' 'c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\User\AppData\Local\Temp\pip-build-env-5q0hqfh4\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- wheel setuptools 'Cython>=0.29.2' 'numpy==1.13.3; python_version=='"'"'3.5'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.13.3; python_version=='"'"'3.6'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.14.5; python_version>='"'"'3.7'"'"' and platform_system!='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.5'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version=='"'"'3.6'"'"' and platform_system=='"'"'AIX'"'"'' 'numpy==1.16.0; python_version>='"'"'3.7'"'"' and platform_system=='"'"'AIX'"'"''
cwd: None

Any ideas? I spent all day just trying to install pip.
Reply
#2
run form command line, not from within python interpreter.
Reply
#3
(Nov-09-2019, 03:21 PM)Larz60+ Wrote: run form command line, not from within python interpreter.


I do. Still doesnt work.
Reply
#4
I just ran it from command line and it worked fine.
$ pip install librosa
Misc$ pip install librosa
Collecting librosa
  Downloading https://files.pythonhosted.org/packages/0b/71/c21ccef81276d85b9e3a36d80dad5baaf8a91f912e65eff0fd0d74a5a19c/librosa-0.7.1.tar.gz (1.6MB)
     |████████████████████████████████| 1.6MB 2.1MB/s 
Requirement already satisfied: audioread>=2.0.0 in ./venv/lib/python3.7/site-packages (from librosa) (2.1.8)
Requirement already satisfied: numpy>=1.15.0 in ./venv/lib/python3.7/site-packages (from librosa) (1.17.2)
Requirement already satisfied: scipy>=1.0.0 in ./venv/lib/python3.7/site-packages (from librosa) (1.3.1)
Requirement already satisfied: scikit-learn!=0.19.0,>=0.14.0 in ./venv/lib/python3.7/site-packages (from librosa) (0.21.3)
Requirement already satisfied: joblib>=0.12 in ./venv/lib/python3.7/site-packages (from librosa) (0.14.0)
Requirement already satisfied: decorator>=3.0.0 in ./venv/lib/python3.7/site-packages (from librosa) (4.4.1)
Requirement already satisfied: six>=1.3 in ./venv/lib/python3.7/site-packages (from librosa) (1.12.0)
Requirement already satisfied: resampy>=0.2.2 in ./venv/lib/python3.7/site-packages (from librosa) (0.2.2)
Requirement already satisfied: numba>=0.43.0 in ./venv/lib/python3.7/site-packages (from librosa) (0.46.0)
Requirement already satisfied: soundfile>=0.9.0 in ./venv/lib/python3.7/site-packages (from librosa) (0.10.2)
Requirement already satisfied: llvmlite>=0.30.0dev0 in ./venv/lib/python3.7/site-packages (from numba>=0.43.0->librosa) (0.30.0)
Requirement already satisfied: cffi>=1.0 in ./venv/lib/python3.7/site-packages (from soundfile>=0.9.0->librosa) (1.13.2)
Requirement already satisfied: pycparser in ./venv/lib/python3.7/site-packages (from cffi>=1.0->soundfile>=0.9.0->librosa) (2.19)
Installing collected packages: librosa
    Running setup.py install for librosa ... done
Successfully installed librosa-0.7.1
Tell me more about your system, and python versions.
Reply
#5
(Nov-10-2019, 12:19 AM)Larz60+ Wrote: I just ran it from command line and it worked fine.
 $ pip install librosa 
 Misc$ pip install librosa Collecting librosa Downloading https://files.pythonhosted.org/packages/0b/71/c21ccef81276d85b9e3a36d80dad5baaf8a91f912e65eff0fd0d74a5a19c/librosa-0.7.1.tar.gz (1.6MB) |████████████████████████████████| 1.6MB 2.1MB/s Requirement already satisfied: audioread>=2.0.0 in ./venv/lib/python3.7/site-packages (from librosa) (2.1.8) Requirement already satisfied: numpy>=1.15.0 in ./venv/lib/python3.7/site-packages (from librosa) (1.17.2) Requirement already satisfied: scipy>=1.0.0 in ./venv/lib/python3.7/site-packages (from librosa) (1.3.1) Requirement already satisfied: scikit-learn!=0.19.0,>=0.14.0 in ./venv/lib/python3.7/site-packages (from librosa) (0.21.3) Requirement already satisfied: joblib>=0.12 in ./venv/lib/python3.7/site-packages (from librosa) (0.14.0) Requirement already satisfied: decorator>=3.0.0 in ./venv/lib/python3.7/site-packages (from librosa) (4.4.1) Requirement already satisfied: six>=1.3 in ./venv/lib/python3.7/site-packages (from librosa) (1.12.0) Requirement already satisfied: resampy>=0.2.2 in ./venv/lib/python3.7/site-packages (from librosa) (0.2.2) Requirement already satisfied: numba>=0.43.0 in ./venv/lib/python3.7/site-packages (from librosa) (0.46.0) Requirement already satisfied: soundfile>=0.9.0 in ./venv/lib/python3.7/site-packages (from librosa) (0.10.2) Requirement already satisfied: llvmlite>=0.30.0dev0 in ./venv/lib/python3.7/site-packages (from numba>=0.43.0->librosa) (0.30.0) Requirement already satisfied: cffi>=1.0 in ./venv/lib/python3.7/site-packages (from soundfile>=0.9.0->librosa) (1.13.2) Requirement already satisfied: pycparser in ./venv/lib/python3.7/site-packages (from cffi>=1.0->soundfile>=0.9.0->librosa) (2.19) Installing collected packages: librosa Running setup.py install for librosa ... done Successfully installed librosa-0.7.1 
Tell me more about your system, and python versions.


python -v

does tell me what version i have. i reinstalled it yesterday so the newest one.

i have windows 10.

This is the error.

Quote: ERROR: Command errored out with exit status 1:
command: 'c:\users\user\appdata\local\programs\python\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-66xrvb9f\\numba\\setup.py'"'"'; __file__='"'"'C:\\Users\\User\\AppData\\Local\\Temp\\pip-install-66xrvb9f\\numba\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\User\AppData\Local\Temp\pip-install-66xrvb9f\numba\pip-egg-info'
cwd: C:\Users\User\AppData\Local\Temp\pip-install-66xrvb9f\numba\
Complete output (184 lines):
Could not locate executable g77
Could not locate executable f77
Could not locate executable ifort
Could not locate executable ifl
Could not locate executable f90
Could not locate executable DF
Could not locate executable efl
Could not locate executable gfortran
Could not locate executable f95
Could not locate executable g95
Could not locate executable efort
Could not locate executable efc
Could not locate executable flang
don't know how to compile Fortran code on platform 'nt'
'svnversion' is not recognized as an internal or external command,
operable program or batch file.
non-existing path in 'numpy\\distutils': 'site.cfg'
Running from numpy source directory.
C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\setup.py:418: UserWarning: Unrecognized setuptools command, proceeding with generating Cython sources and expanding templates
run_build = parse_setuppy_commands()
C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\system_info.py:690: UserWarning:
Optimized (vendor) Blas libraries are not found.
Falls back to netlib Blas library which has worse performance.
A better performance should be easily gained by switching
Blas library.
self.calc_info()
C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\system_info.py:690: UserWarning:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
self.calc_info()
C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\system_info.py:690: UserWarning:
Blas (http://www.netlib.org/blas/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [blas_src]) or by setting
the BLAS_SRC environment variable.
self.calc_info()
C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\system_info.py:1712: UserWarning:
Lapack (http://www.netlib.org/lapack/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [lapack]) or by setting
the LAPACK environment variable.
if getattr(self, '_calc_info_{}'.format(lapack))():
C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\system_info.py:1712: UserWarning:
Lapack (http://www.netlib.org/lapack/) sources not found.
Directories to search for the sources can be specified in the
numpy/distutils/site.cfg file (section [lapack_src]) or by setting
the LAPACK_SRC environment variable.
if getattr(self, '_calc_info_{}'.format(lapack))():
c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\dist.py:274: UserWarning: Unknown distribution option: 'define_macros'
warnings.warn(msg)
Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 489, in _find_latest_available_vc_ver
return self.find_available_vc_vers()[-1]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 148, in setup
dist.run_commands()
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 966, in run_commands
self.run_command(cmd)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\bdist_egg.py", line 163, in run
self.run_command("egg_info")
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\command\egg_info.py", line 26, in run
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\cmd.py", line 313, in run_command
self.distribution.run_command(command)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\dist.py", line 985, in run_command
cmd_obj.run()
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\command\build_src.py", line 142, in run
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\command\build_src.py", line 153, in build_sources
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\command\build_src.py", line 286, in build_library_sources
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\command\build_src.py", line 369, in generate_sources
File "numpy\core\setup.py", line 667, in get_mathlib_info
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\command\config.py", line 241, in try_link
self._check_compiler()
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\command\config.py", line 54, in _check_compiler
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\_msvccompiler.py", line 253, in initialize
vc_env = _get_vc_env(plat_spec)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 185, in msvc14_get_vc_env
return EnvironmentInfo(plat_spec, vc_min_ver=14.0).return_env()
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 843, in __init__
self.si = SystemInfo(self.ri, vc_ver)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 485, in __init__
self.vc_ver = vc_ver or self._find_latest_available_vc_ver()
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\msvc.py", line 492, in _find_latest_available_vc_ver
raise distutils.errors.DistutilsPlatformError(err)
distutils.errors.DistutilsPlatformError: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\setup.py", line 443, in <module>
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\setup.py", line 435, in setup_package
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\core.py", line 171, in setup
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1144, in run_setup
run_setup(setup_script, args)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 253, in run_setup
raise
File "c:\users\user\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\user\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 166, in save_modules
saved_exc.resume()
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 141, in resume
six.reraise(type, exc, self._tb)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\_vendor\six.py", line 685, in reraise
raise value.with_traceback(tb)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 154, in save_modules
yield saved
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 195, in setup_context
yield
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 250, in run_setup
_execfile(setup_script, ns)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\sandbox.py", line 45, in _execfile
exec(code, globals, locals)
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\setup.py", line 443, in <module>
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\setup.py", line 435, in setup_package
File "C:\Users\User\AppData\Local\Temp\easy_install-xh86n2ik\numpy-1.17.3\numpy\distutils\core.py", line 171, in setup
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\distutils\core.py", line 163, in setup
raise SystemExit("error: " + str(msg))
SystemExit: error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\User\AppData\Local\Temp\pip-install-66xrvb9f\numba\setup.py", line 365, in <module>
setup(**metadata)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 144, in setup
_install_setup_requires(attrs)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\__init__.py", line 139, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 716, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 780, in resolve
dist = best[req.key] = env.best_match(
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1065, in best_match
return self.obtain(req, installer)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\pkg_resources\__init__.py", line 1077, in obtain
return installer(requirement)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\dist.py", line 786, in fetch_build_egg
return cmd.easy_install(req)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 679, in easy_install
return self.install_item(spec, dist.location, tmpdir, deps)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 705, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 890, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1158, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "c:\users\user\appdata\local\programs\python\python38-32\lib\site-packages\setuptools\command\easy_install.py", line 1146, in run_setup
raise DistutilsError("Setup script exited with %s" % (v.args[0],))
distutils.errors.DistutilsError: Setup script exited with error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": https://visualstudio.microsoft.com/downloads/
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Quote:Microsoft Visual C++ 14.0 is required.

I went through that link twice and installed different things.

why cant they just be clear on what we have to do?
Reply
#6
Python 3.8 is still new and not all libraries are up to date yet.
librosa use a lot of libraries over 10,and this will fail using Python 3.8(i have tried).
Python 3.6/3.7 and pip installation under Windows

Here Python 3.7 and in a virtual environment and it work.
# Check pip
(forum_env) E:\div_code\forum_env
λ pip -V
pip 19.2.3 from e:\div_code\forum_env\lib\site-packages\pip (python 3.7)

# Install
(forum_env) E:\div_code\forum_env
λ pip install librosa
Collecting librosa
  Downloading ......
Successfully installed audioread-2.1.8 cffi-1.13.2 decorator-4.4.1 joblib-0.14.0 librosa-0.7.1 llvmlite-0.30.0
numba-0.46.0 numpy-1.17.3 pycparser-2.19 resampy-0.2.2 scikit-learn-0.21.3 scipy-1.3.2 six-1.13.0 soundfile-0.10.2

# Test that it work
(forum_env) E:\div_code\forum_env
λ ptpython
>>> import librosa
>>>
>>> librosa.__version__
'0.7.1'

>>> librosa.beat
<module 'librosa.beat' from 'e:\\div_code\\forum_env\\lib\\site-packages\\librosa\\beat.py'>

>>> help(librosa.beat)
Help on module librosa.beat in librosa:

NAME
    librosa.beat

DESCRIPTION
    Beat and tempo
    ==============
    .. autosummary::
       :toctree: generated/

       beat_track
       plp
       tempo
       ..... Long help
Reply
#7
Thanks.

I just deleted python and reinstalled 3.7.5.

Now another stupid question, do I install these libraries in c:\?

It says the library is installed but i still get errors in Visual Code.

Quote:(.venv) PS C:\Sandbox\Python> & c:/Sandbox/Python/.venv/Scripts/python.exe c:/Sandbox/Python/Audio/audio.py
Traceback (most recent call last):
File "c:/Sandbox/Python/Audio/audio.py", line 1, in <module>
import librosa
ModuleNotFoundError: No module named 'librosa'
Reply
#8
(Nov-11-2019, 07:12 PM)PythonSounds Wrote: Now another stupid question, do I install these libraries in c:\?
No all get done bye pip,download and install to Python.
Quote:It says the library is installed but i still get errors in Visual Code.
When use virtual environment use most choose that interpreter in VS Code.
You should give name to virtual environment,not (.venv).
If you new to this can just install it normal,i use virtual environment when testing this as i have a lot install already,so i don't get any conflict.

Here basic setup virtual environment.
# Make
E:\div_code
λ python -m venv librosa_env

# Cd in
E:\div_code
λ cd librosa_env\

# Activate
E:\div_code\librosa_env
λ E:\div_code\librosa_env\Scripts\activate

# Test pip,see that it point to this folder
(librosa_env) E:\div_code\librosa_env
λ pip -V
pip 19.0.3 from e:\div_code\librosa_env\lib\site-packages\pip (python 3.7)

# The python version that most point to if use in Editor
(librosa_env) E:\div_code\librosa_env
λ python -c "import sys; print(sys.executable)"
E:\div_code\librosa_env\Scripts\python.exe
Reply
#9
i am searching where pythn is installed. I dont see it in my user folder.

(Nov-12-2019, 05:43 PM)snippsat Wrote:
(Nov-11-2019, 07:12 PM)PythonSounds Wrote: Now another stupid question, do I install these libraries in c:\?
No all get done bye pip,download and install to Python.
Quote:It says the library is installed but i still get errors in Visual Code.
When use virtual environment use most choose that interpreter in VS Code.
You should give name to virtual environment,not (.venv).
If you new to this can just install it normal,i use virtual environment when testing this as i have a lot install already,so i don't get any conflict.

Here basic setup virtual environment.
# Make
E:\div_code
λ python -m venv librosa_env

# Cd in
E:\div_code
λ cd librosa_env\

# Activate
E:\div_code\librosa_env
λ E:\div_code\librosa_env\Scripts\activate

# Test pip,see that it point to this folder
(librosa_env) E:\div_code\librosa_env
λ pip -V
pip 19.0.3 from e:\div_code\librosa_env\lib\site-packages\pip (python 3.7)

# The python version that most point to if use in Editor
(librosa_env) E:\div_code\librosa_env
λ python -c "import sys; print(sys.executable)"
E:\div_code\librosa_env\Scripts\python.exe


i am trying to follow this but its stuck. like how do i exit the ven?

I can follow all the coding on w3schools and other data science sites, just struggling with cmd on windows. its so much easier on linux.

I get this

C:\Sandbox\Python\.venv\Scripts\python.exe

But still no librosa.
Reply
#10
(Nov-13-2019, 09:55 AM)PythonSounds Wrote: i am trying to follow this but its stuck. like how do i exit the ven?
deactivate you see that (librosa_env) goes away.
You don't need to use virtual environment,you have new Python 3.7 install.
So just do pip install librosa from cmd.
Test that pip work from anywhere.
Example:
Microsoft Windows [Version 10.0.18362.476]
(c) 2019 Microsoft Corporation. Med enerett.

C:\WINDOWS\system32>cd ..

C:\Windows>cd ..

C:\>pip -V
pip 19.3.1 from c:\python37\lib\site-packages\pip (python 3.7)

C:\>pip install librosapip
If pip not found look at this Python 3.6/3.7 and pip installation under Windows
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020