pipenv无法安装软件包并引发错误 [英] pipenv can't install packages and throws an error

查看:678
本文介绍了pipenv无法安装软件包并引发错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是python的新手.我刚刚安装了Python和Pip.
我需要为个人项目安装一些软件包.
我使用$ pipenv shell创建了一个虚拟环境.
然后我运行了$ pipenv install dlib.
但是我收到以下错误:

I am a newbie to python. I have just installed Python and Pip.
I need to install some packages for a personal project.
I created a virtual environment using $ pipenv shell.
I then ran $ pipenv install dlib.
But I received the following error:

Error text:
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = 'C:\Users\samya\.virtualenvs\py_img_recog-DAsXOW1h\Scripts\python.exe'
  isolated = 0
  environment = 1
  user site = 1
  import site = 1
  sys._base_executable = 'C:\\Users\\samya\\.virtualenvs\\py_img_recog-DAsXOW1h\\Scripts\\python.exe'
  sys.base_prefix = ''
  sys.base_exec_prefix = ''
  sys.executable = 'C:\\Users\\samya\\.virtualenvs\\py_img_recog-DAsXOW1h\\Scripts\\python.exe'
  sys.prefix = ''
  sys.exec_prefix = ''
  sys.path = [
    'C:\\Users\\samya\\.virtualenvs\\py_img_recog-DAsXOW1h\\Scripts\\python38.zip',
    '.\\DLLs',
    '.\\lib',
    'c:\\users\\samya\\appdata\\local\\programs\\python\\python38-32',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x000042ec (most recent call first):
<no Python frame>
[   =] Installing dlib...
Installation Failed 

我正在Windows 10 x64位系统上运行Python 3.8.3和Pip 20.1.1.

I am running Python 3.8.3 and Pip 20.1.1 on Windows 10 x64 bit system.

谢谢您的帮助!

推荐答案

这意味着您的pip命令路径未在系统的路径变量中设置

this means your pip command path is not set in the path variables of system

您可以尝试执行以下操作:

You can try doing the following:

  • 转到此Pc>属性>高级设置>环境变量

  • go to This Pc>properties>Advanced Settings>environment variables

..然后单击新建

..然后选择您的python pip命令可用的路径

..then select the path where your python pip command is available

..并简单地给它命名为python38多数民众赞成

.. and simply give it a name python38 thats it

然后它将创建您的venv

then it will create your venv

这篇关于pipenv无法安装软件包并引发错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆