mim icon indicating copy to clipboard operation
mim copied to clipboard

Can it be used in Windows and Python virtual environments?

Open VacantHusky opened this issue 1 year ago • 4 comments

windows11, python3.8, pycharm2022.

D:\AppInstall\Python38\python.exe: No module named pip
Command '['python', '-m', 'pip', '--default-timeout', '45', 'install', 'mmcv==2.0.0rc4']' returned non-zero exit status 1.

D:\AppInstall\Python38\python.exe is not the virtual environment I use, but my main environment。 My virtual environment was created by pycharm。

Please help me!

VacantHusky avatar Mar 21 '23 06:03 VacantHusky

Hi @VacantHusky , openmim can be also used in Windows and it is recommended to install openmim in a conda environment.

zhouzaida avatar May 19 '23 08:05 zhouzaida

The package pip is missed in your environment. You can use python -m ensurepip to install pip manually.

The ensurepip package provides support for bootstrapping the pip installer into an existing Python installation or virtual environment. This bootstrapping approach reflects the fact that pip is an independent project with its own release cycle, and the latest available stable version is bundled with maintenance and feature releases of the CPython reference interpreter. In most cases, end users of Python shouldn’t need to invoke this module directly (as pip should be bootstrapped by default), but it may be needed if installing pip was skipped when installing Python (or when creating a virtual environment) or after explicitly uninstalling pip.

Source: https://docs.python.org/3.8/library/ensurepip.html

nok avatar Jul 02 '23 12:07 nok

` (venv) D:\ai>python -m ensurepip Looking in links: c:\Users\ADMINI~1\AppData\Local\Temp\tmpq7ar6q64 Requirement already satisfied: setuptools in d:\ai\venv\lib\site-packages (60.2.0) Requirement already satisfied: pip in d:\ai\venv\lib\site-packages (24.0)

(venv) D:\ai>mim install "mmpose>=1.1.0" Looking in indexes: https://mirror.baidu.com/pypi/simple/ Looking in links: https://download.openmmlab.com/mmcv/dist/cu117/torch2.0.0/index.html Collecting mmpose>=1.1.0 Using cached https://mirror.baidu.com/pypi/packages/09/8c/b8f4d587b54f5f43febb4733799c616355f1d9f3a8add103ada126c87d24/mmpose-1.3.1-py2.py3-none-any.whl (1.7 MB) Collecting chumpy (from mmpose>=1.1.0) Using cached https://mirror.baidu.com/pypi/packages/01/f7/865755c8bdb837841938de622e6c8b5cb6b1c933bde3bd3332f0cd4574f1/chumpy-0.70.tar.gz (50 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [23 lines of output] Traceback (most recent call last): File "", line 9, in ModuleNotFoundError: No module named 'pip'

  During handling of the above exception, another exception occurred:

  Traceback (most recent call last):
    File "D:\ai\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
      main()
    File "D:\ai\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "D:\ai\venv\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-_47_04h5\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-_47_04h5\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-_47_04h5\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
      super().run_setup(setup_script=setup_script)
    File "C:\Users\Administrator\AppData\Local\Temp\pip-build-env-_47_04h5\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 11, in <module>
  ModuleNotFoundError: No module named 'pip'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.`

i run cmd in venv in windows cmd, is no work for me

also i install mmcv like 'mim install mmcv',is work,but not work for 'mim install mmpose'

hhhuaang avatar Apr 15 '24 04:04 hhhuaang

I can reproduce the same issue. Create a venv and then these commands (these are to try and get MusePose working)

pip install --no-cache-dir -U openmim 
mim install mmengine 
mim install "mmcv>=2.0.1" 
mim install "mmdet>=3.1.0" 
mim install "mmpose>=1.1.0" 

mmpose stage gives the same no module named pip. Is it possible to install the aboive using the standard pip install command, and if so, how?

SoftologyPro avatar Jun 08 '24 11:06 SoftologyPro