Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何在Visual Studio中解决PIL和枕头的问题?_Python_Visual Studio_Pip_Python Imaging Library - Fatal编程技术网

Python 如何在Visual Studio中解决PIL和枕头的问题?

Python 如何在Visual Studio中解决PIL和枕头的问题?,python,visual-studio,pip,python-imaging-library,Python,Visual Studio,Pip,Python Imaging Library,我正在使用VisualStudio(而不是VS代码)编写Python代码。从SolutionExplorer和Python环境中,我安装了以下软件包:Pillow、Pillow-PIL、PIL-Lite、PillowImage。我也以同样的方式安装了pip。问题是,当我编写此代码时: 从PIL导入图像: myImage = Image.open("your_image_here"); myImage.show(); 我得到的信息是,PIL尚未解决,尽管我有所有这些包 我在解决方案资

我正在使用VisualStudio(而不是VS代码)编写Python代码。从SolutionExplorer和Python环境中,我安装了以下软件包:Pillow、Pillow-PIL、PIL-Lite、PillowImage。我也以同样的方式安装了pip。问题是,当我编写此代码时:

从PIL导入图像:

   myImage = Image.open("your_image_here");
   myImage.show();
我得到的信息是,PIL尚未解决,尽管我有所有这些包

我在解决方案资源管理器中键入了PIL,其中有一个字段:Run command:pip install PIL。我试图安装它,但我没有得到它作为一个包。在那之后,我卸载了所有其他软件包,并尝试再次安装这个软件包-同样的事情

我试着从3天开始运行这个基本代码,但没有结果。我试着用CMD安装它,但我只得到了无法识别pip的错误,尽管我使用了许多不同的路径

如果你能在这个问题上帮助我,我将非常感激