简体   繁体   English

pip安装错误:ModuleNotFoundError没有名为“ setuptools”的模块

[英]pip install error: ModuleNotFoundError No module named 'setuptools'

When I run pip install virtualenvwrapper-win in a PowerShell console I get the error: 当我在PowerShell控制台中运行pip install virtualenvwrapper-win ,出现错误:

PS C:\\Windows\\system32> pip install virtualenvwrapper-win Collecting virtualenvwrapper-win Using cached virtualenvwrapper-win-1.2.1.zip Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'setuptools' PS C:\\ Windows \\ system32> pip install virtualenvwrapper-win收集virtualenvwrapper-win使用已缓存的virtualenvwrapper-win-1.2.1.zip命令python setup.py的完整输出。pyegg_info:追溯(最近一次调用):文件“”,第1行,在ModuleNotFoundError中:没有名为“ setuptools”的模块

Command "python setup.py egg_info" failed with error code 1 in 命令“ python setup.py egg_info”失败,错误代码为1

I've tried doing pip install setuptools and also tried uninstalling and reinstalling and update but the error persists. 我试过做pip install setuptools ,也尝试过卸载,重新安装和更新,但错误仍然存​​在。

pip and python executables have been added to environment variables. pippython可执行文件已添加到环境变量中。

Try installing the virtualenvwrapper-win module manually by downloading the ZIP archive from here: https://pypi.python.org/pypi/virtualenvwrapper-win 尝试通过从此处下载ZIP存档来手动安装virtualenvwrapper-win模块: https : //pypi.python.org/pypi/virtualenvwrapper-win

  • In your PowerShell console, go to the directory the archive downloaded to (mine goes to C:\\Users\\user\\Downloads\\ ) and run this to extract the archive: Expand-Archive .\\virtualenvwrapper-win-1.2.1.zip 在您的PowerShell控制台中,转到下载存档的目录(我的文件夹转到C:\\Users\\user\\Downloads\\ ),然后运行它以提取存档: Expand-Archive .\\virtualenvwrapper-win-1.2.1.zip

  • Still in PowerShell and in the same directory as above, run: cd .\\virtualenvwrapper-win-1.2.1\\virtualenvwrapper-win-1.2.1\\ 仍在PowerShell中,并在与上述相同的目录中,运行: cd .\\virtualenvwrapper-win-1.2.1\\virtualenvwrapper-win-1.2.1\\

  • Next, run: python setup.py install 接下来,运行: python setup.py install

If all went well, you should see something like this: 如果一切顺利,您应该会看到类似以下内容:

    PS C:\Users\user\Downloads\virtualenvwrapper-win-1.2.1\virtualenvwrapper-win-1.2.1> python .\setup.py install
    running install
    running bdist_egg
    running egg_info
    writing virtualenvwrapper_win.egg-info\PKG-INFO
    writing dependency_links to virtualenvwrapper_win.egg-info\dependency_links.txt
    writing requirements to virtualenvwrapper_win.egg-info\requires.txt
    writing top-level names to virtualenvwrapper_win.egg-info\top_level.txt
    reading manifest file 'virtualenvwrapper_win.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    writing manifest file 'virtualenvwrapper_win.egg-info\SOURCES.txt'
    installing library code to build\bdist.win-amd64\egg
    running install_lib
    warning: install_lib: 'build\lib' does not exist -- no Python modules to install

    creating build
    creating build\bdist.win-amd64
    creating build\bdist.win-amd64\egg
    creating build\bdist.win-amd64\egg\EGG-INFO
    installing scripts to build\bdist.win-amd64\egg\EGG-INFO\scripts
    running install_scripts
    running build_scripts
    creating build\scripts-3.6
    copying scripts\add2virtualenv.bat -> build\scripts-3.6
    copying scripts\cd-.bat -> build\scripts-3.6
    copying scripts\cdproject.bat -> build\scripts-3.6
    copying scripts\cdsitepackages.bat -> build\scripts-3.6
    copying scripts\cdvirtualenv.bat -> build\scripts-3.6
    copying scripts\folder_delete.bat -> build\scripts-3.6
    copying scripts\lssitepackages.bat -> build\scripts-3.6
    copying scripts\lsvirtualenv.bat -> build\scripts-3.6
    copying scripts\mkvirtualenv.bat -> build\scripts-3.6
    copying scripts\rmvirtualenv.bat -> build\scripts-3.6
    copying scripts\setprojectdir.bat -> build\scripts-3.6
    copying scripts\toggleglobalsitepackages.bat -> build\scripts-3.6
    copying scripts\whereis.bat -> build\scripts-3.6
    copying scripts\workon.bat -> build\scripts-3.6
    creating build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\add2virtualenv.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\cd-.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\cdproject.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\cdsitepackages.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\cdvirtualenv.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\folder_delete.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\lssitepackages.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\lsvirtualenv.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\mkvirtualenv.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\rmvirtualenv.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\setprojectdir.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\toggleglobalsitepackages.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\whereis.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying build\scripts-3.6\workon.bat -> build\bdist.win-amd64\egg\EGG-INFO\scripts
    copying virtualenvwrapper_win.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
    copying virtualenvwrapper_win.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
    copying virtualenvwrapper_win.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
    copying virtualenvwrapper_win.egg-info\not-zip-safe -> build\bdist.win-amd64\egg\EGG-INFO
    copying virtualenvwrapper_win.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
    copying virtualenvwrapper_win.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
    creating dist
    creating 'dist\virtualenvwrapper_win-1.2.1-py3.6.egg' and adding 'build\bdist.win-amd64\egg' to it
    removing 'build\bdist.win-amd64\egg' (and everything under it)
    Processing virtualenvwrapper_win-1.2.1-py3.6.egg
    creating c:\users\user\appdata\local\programs\python\python36\lib\site-packages\virtualenvwrapper_win-1.2.1-py3.6.egg
    Extracting virtualenvwrapper_win-1.2.1-py3.6.egg to c:\users\user\appdata\local\programs\python\python36\lib\site-packages
    Adding virtualenvwrapper-win 1.2.1 to easy-install.pth file
    Installing add2virtualenv.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing cd-.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing cdproject.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing cdsitepackages.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing cdvirtualenv.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing folder_delete.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing lssitepackages.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing lsvirtualenv.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing mkvirtualenv.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing rmvirtualenv.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing setprojectdir.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing toggleglobalsitepackages.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing whereis.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing workon.bat script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts

    Installed c:\users\user\appdata\local\programs\python\python36\lib\site-packages\virtualenvwrapper_win-1.2.1-py3.6.egg
    Processing dependencies for virtualenvwrapper-win==1.2.1
    Searching for virtualenv==15.1.0
    Best match: virtualenv 15.1.0
    Adding virtualenv 15.1.0 to easy-install.pth file
    Installing virtualenv-script.py script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts
    Installing virtualenv.exe script to C:\Users\user\AppData\Local\Programs\Python\Python36\Scripts

    Using c:\users\user\appdata\local\programs\python\python36\lib\site-packages
    Finished processing dependencies for virtualenvwrapper-win==1.2.1

virtualenvwrapper-win is only intended for the DOS cmd.exe. virtualenvwrapper-win仅用于DOS cmd.exe。 From the README: 从自述文件:

These scripts should work on any version of Windows (Windows XP, Windows Vista, Windows 7/8/10). 这些脚本可在任何版本的Windows(Windows XP,Windows Vista,Windows 7/8/10)上运行。

However, they only work in the regular command prompt . 但是,它们仅在常规命令提示符下工作 They will not work in Powershell. 它们将无法在Powershell中工作。 There are other virtualenvwrapper projects out there for Powershell. Powershell还有其他virtualenvwrapper项目。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Pip 安装:错误“没有名为‘setuptools’的模块” - Pip install: Error “No module named 'setuptools' ” Pip 安装 cchardet 失败,出现错误“ModuleNotFoundError: No module named 'setuptools.py31compat'” - Pip install failed for cchardet with error "ModuleNotFoundError: No module named 'setuptools.py31compat'" Python setuptools - 没有以 pip install 命名的模块 - Python setuptools - no module named after pip install python install pip,错误为“ ModuleNotFoundError:没有名为“ _struct”的模块” - python install pip with error “ModuleNotFoundError: No module named '_struct'” 带有 pip -e 的 Conda 环境:ModuleNotFoundError:没有名为“setuptools”的模块 - Conda environment with pip -e : ModuleNotFoundError: No module named 'setuptools' Python pip 安装失败,出现 ModuleNotFoundError:没有名为“pyexpat”的模块错误 - Python pip Install failing with ModuleNotFoundError: No module named 'pyexpat' error ModuleNotFoundError: No module named 'face_recognition'->pip install dlib 错误 - ModuleNotFoundError: No module named 'face_recognition'->pip install dlib error ModuleNotFoundError:pip安装后没有名为“请求”的模块 - ModuleNotFoundError: No module named 'requests' after pip install ModuleNotFoundError: 没有命名模块<modulename> pip安装后 - ModuleNotFoundError: No module named <modulename> after pip install 为什么即使我安装了 setuptools,`pip install -e` 也会给我一个“没有名为 'setuptools' 的模块”错误? - Why does `pip install -e` give me a "no module named 'setuptools'" error even though I have setuptools installed?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM