Using the Tensorflow runtime environment in PyCharm, Failed to Install xxx when installing the package

Using the Tensorflow runtime environment in PyCharm, I encountered problems when installing the package

Problem Description:

When installing the package according to the prompt of the small red light bulb in PyCharm,
the failed to install package is displayed
as follows:
Failed to Install 'streamlit'

solution one

insert image description here
When installing in the console in PyCharm,
switch to the Scripts folder first, and then move to the environment under Tensorflow_gpu after the installation is complete there.
insert image description here
insert image description here
Then enter the command to install the package
pip install streamlit
insert image description here
After the installation is successful, enter the command to copy the package to copy the package to the tensorflow_gpu environment. Note, modify it to your own path and your own tensorflow_gpu name.
C:\develop\anaconda3\Scripts\conda.exe install -p C:/develop/anaconda3/envs/tensorflow_gpu streamlit -y

solution two

Directly find the operating environment of tensorflow_gpu, such as mine installed on anaconda, open Anaconda Navigator->Environments->tensorflow_gpu,
click the triangle button, and select open Terminal.

insert image description here
insert image description here

After entering the command directly
pip install package
insert image description here
, it will display
Successfully built blinker
and then open the script file in PyCharm, no error will be reported.

Guess you like

Origin blog.csdn.net/qq_44985985/article/details/124490797