You might encounter a problem when installing a Python package in the project settings or in the Python Package tool window. Eventually, most of the issues are out of IDE control as PyCharm uses the pip package manager to perform the actual installation.
This article provides troubleshooting tips and covers some typical cases.
Install a package using the Terminal
The most viable troubleshooting action is to try installing the problematic package on the selected Python interpreter using the terminal. If you get an identical error message, then the problem is not in the IDE and you should review the rationales and typical cases, or search for a solution on the Internet.
Install a package on a virtual environment
-
Press Ctrl+Alt+S to open the IDE settings and select .
-
Expand the list of the available interpreters and click Show All.
-
Locate the target interpreter and press .
Copy or memorize the path of the virtual environment and close the dialogs.
-
Open the terminal and run the following commands:
source <venv path>/bin/activate
pip install <package name> -
Inspect and parse the results.
Install a package on a Conda environment
-
Open the terminal and run the following commands:
Conda < 4.6
Conda >= 4.6
activate <conda env name>
conda install <package name>conda activate <conda env name>
conda install <package name>Conda < 4.6
Conda >= 4.6
source activate <conda env name>
conda install <package name>conda activate <conda env name>
conda install <package name>See Conda documentation for more information on how to activate an environment.
One of the possible failure cases occurs when the target package is not available in the repositories supported by the Conda package manager.
-
Inspect and parse the results.
Install a package on a system interpreter
-
To check the path of the currently selected system interpreter that you were trying to install a package on, press Ctrl+Alt+S and go to .
-
Expand the list of the project interpreters and scroll it down, then select the item.
-
Locate the interpreter and press .
Copy or memorize the path of the environment and close the dialogs.
-
Open the terminal and run the following commands:
cd <interpreter path>
-m pip install <package name>You might need the admin privileges to install packages on a system interpreter.
-
Inspect and parse the results.
Parse the results
Result |
Action |
---|---|
The package cannot be installed because the Python version doesn’t satisfy the package requirement. |
Try to create another Python interpreter that is based on the Python version that meets the requirement. |
The package cannot be installed because you don’t have permissions to install it. |
Try to install the package using super-user privileges, for example, |
The package cannot be installed because the package is not available in the repository that is supported by the selected package manager. Example: you’re trying to install a package that is not available in the Conda package manager repositories. |
Try to configure another type of Python interpreter for your project and install the package on it. See how to add and modify a Python interpreter in Configure a Python interpreter. |
The package cannot be installed and it matches one of the typical package installation failure cases. |
Check the cases and apply related workarounds. |
The package is successfully installed. |
File an issue in the PyCharm issue tracker and provide explicit details about the case including all console output, error messages, and screenshots indicating that you tried to install the package on the same interpreter in the terminal and in the project settings or in the Python Packages tool window. |
Review typical cases
Last modified: 16 December 2022
I installed PyCharm Community Edition 3.0 on windows 7 machine; and tried to install some common packages, like numpy, scipy…
I followed exactly the instruction from the JetBrains website
http://www.jetbrains.com/pycharm/webhelp/installing-uninstalling-and-upgrading-packages.html
but the installation always fails…
«Install packages failed: Error occurred when installing package numpy….»
Running setup.py egg_info for package numpy
Forcing DISTUTILS_USE_SDK=1
non-existing path in 'numpy\distutils': 'site.cfg'
F2PY Version 2
blas_opt_info:
blas_mkl_info:
libraries mkl,vml,guide not found in ['C:\Python27\lib', 'C:\', 'C:\Python27\libs']
NOT AVAILABLE
atlas_blas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in ['C:\Python27\lib', 'C:\', 'C:\Python27\libs']
NOT AVAILABLE
atlas_blas_info:
libraries f77blas,cblas,atlas not found in ['C:\Python27\lib', 'C:\', 'C:\Python27\libs']
NOT AVAILABLE
blas_info:
libraries blas not found in ['C:\Python27\lib', 'C:\', 'C:\Python27\libs']
NOT AVAILABLE
blas_src_info:
NOT AVAILABLE
NOT AVAILABLE
lapack_opt_info:
lapack_mkl_info:
mkl_info:
libraries mkl,vml,guide not found in ['C:\Python27\lib', 'C:\', 'C:\Python27\libs']
NOT AVAILABLE
NOT AVAILABLE
atlas_threads_info:
Setting PTATLAS=ATLAS
libraries ptf77blas,ptcblas,atlas not found in C:Python27lib
libraries lapack_atlas not found in C:Python27lib
libraries ptf77blas,ptcblas,atlas not found in C:
libraries lapack_atlas not found in C:
libraries ptf77blas,ptcblas,atlas not found in C:Python27libs
libraries lapack_atlas not found in C:Python27libs
numpy.distutils.system_info.atlas_threads_info
NOT AVAILABLE
atlas_info:
libraries f77blas,cblas,atlas not found in C:Python27lib
libraries lapack_atlas not found in C:Python27lib
libraries f77blas,cblas,atlas not found in C:
libraries lapack_atlas not found in C:
libraries f77blas,cblas,atlas not found in C:Python27libs
libraries lapack_atlas not found in C:Python27libs
numpy.distutils.system_info.atlas_info
NOT AVAILABLE
lapack_info:
libraries lapack not found in ['C:\Python27\lib', 'C:\', 'C:\Python27\libs']
NOT AVAILABLE
lapack_src_info:
NOT AVAILABLE
NOT AVAILABLE
Хочу скачать библиотеки, но сталкиваюсь с данной проблемой. Что делать?
Install packages failed: Installing packages: error occurred.
-
Вопрос заданболее года назад
-
1111 просмотров
Sterben124, а если в консоли(терминале) набрать просто python, интерпритатор запуускается?
Если да, то он включен в path- переменную, иначе, нужно это сделать.
Добавлено через 2 минуты
Вот поэтому, я работаю на python 3.6 , там,Sterben124, такого горя нет, ибо не не надо брать только что выпущенный релиз, он не все поддерживать может.
Добавлено через 1 минуту
И pyaudio ставится,как я показал.
Добавлено через 45 минут
Sterben124, use python 3.6 and be happy, ибо Ваша проблема от того, что Вы взяли слишком новый релиз, у меня на 3.6 pyaudio работает.
Loading