I was trying to install conda using pip in Command Prompt, I search Everywhere related to this error but I found Nothing that can help me with the problem.
pip install conda
but I got this error:
Collecting conda
Using cached conda-4.3.16.tar.gz (299 kB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pycosat>=0.6.1 in c:\users\asus\appdata\local\programs\python\python37\lib\site-packages
(from conda) (0.6.3)
Requirement already satisfied: requests>=2.12.4 in c:\users\asus\appdata\local\programs\python\python37\lib\site-package
s (from conda) (2.26.0)
Collecting ruamel.yaml>=0.11.14
Using cached ruamel.yaml-0.17.21-py3-none-any.whl (109 kB)
Collecting conda
Using cached conda-4.3.13.tar.gz (370 kB)
Preparing metadata (setup.py) ... done
Using cached conda-4.2.7.tar.gz (235 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string>", line 36, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\ASUS\AppData\Local\Temp\pip-install-89w5h0p1\conda_ae1fc222c1a04f2ca50dbd3c45396cdf\setup.py", line 32, in <module>
from conda._vendor.auxlib import packaging # NOQA
ModuleNotFoundError: No module named 'auxlib'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: There was an error checking the latest version of pip.
Please help me to find a solution for this error.
I found a solution to this problem.
the problem in line
ModuleNotFoundError: No module named 'auxlib'
so I just install auxlib by using
pip install auxlib
and then my problem was resolved.
pip is not the correct way to install conda
See the pypi page
WARNING: Using pip install conda or easy_install conda will not give you conda as a standalone application. Currently supported install methods include the Anaconda installer and the miniconda installer.
Related
Installing wxpython with pip gives the error ModuleNotFoundError: No module named 'attrdict'
Details:
py -3.10-64 -m pip install -U wxpython
Collecting wxpython
Using cached wxPython-4.2.0.tar.gz (71.0 MB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\Bernard\AppData\Local\Temp\pip-install-dokcizpt\wxpython_662eefb4314c47eba7b194b4d07a8e18\setup.py", line 27, in <module>
from buildtools.config import Config, msg, opj, runcmd, canGetSOName, getSOName
File "C:\Users\Bernard\AppData\Local\Temp\pip-install-dokcizpt\wxpython_662eefb4314c47eba7b194b4d07a8e18\buildtools\config.py", line 30, in <module>
from attrdict import AttrDict
ModuleNotFoundError: No module named 'attrdict'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
What works
installing other packages works, e.g.
py -3.10-64 -m pip install -U mido
Requirement already satisfied: mido in c:\python311\lib\site-packages (1.2.10)
Version info
Windows 10 22H2
pip 23.0.1 from C:\Python311\Lib\site-packages\pip (python 3.11)
Context
This is used in the fluidpatcher installer, I logged a bug here.
Update 1
Seems to be a known issue reported here: https://github.com/wxWidgets/Phoenix/issues/2296
Tried workaround of manually installing
py -3.10-64 -m pip install -U attrdict3
Which installs.
Then retried the wxpython install
py -3.10-64 -m pip install -U wxpython
Which fails, this time with a different error message
Collecting wxpython
Using cached wxPython-4.2.0.tar.gz (71.0 MB)
Preparing metadata (setup.py) ... done
Requirement already satisfied: pillow in c:\python311\lib\site-packages (from wxpython) (9.4.0)
Requirement already satisfied: six in c:\python311\lib\site-packages (from wxpython) (1.16.0)
Requirement already satisfied: numpy in c:\python311\lib\site-packages (from wxpython) (1.24.2)
Installing collected packages: wxpython
DEPRECATION: wxpython is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for wxpython ... error
error: subprocess-exited-with-error
× Running setup.py install for wxpython did not run successfully.
│ exit code: 1
╰─> [49 lines of output]
C:\Python311\Lib\site-packages\setuptools\dist.py:771: UserWarning: Usage of dash-separated 'license-file' will not be supported in future versions. Please use the underscore name 'license_file' instead
warnings.warn(
C:\Python311\Lib\site-packages\setuptools\config\setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
warnings.warn(msg, warning_class)
C:\Python311\Lib\site-packages\setuptools\dist.py:317: DistDeprecationWarning: use_2to3 is ignored.
warnings.warn(f"{attr} is ignored.", DistDeprecationWarning)
running install
C:\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
Will build using: "C:\Python311\python.exe"
3.11.0 (main, Oct 24 2022, 18:26:48) [MSC v.1933 64 bit (AMD64)]
Python's architecture is 64bit
cfg.VERSION: 4.2.0
Running command: build
Running command: build_wx
Command '"C:\Python311\python.exe" -c "import os, sys, setuptools.msvc; setuptools.msvc.isfile = lambda path: path is not None and os.path.isfile(path); ei = setuptools.msvc.EnvironmentInfo('x64', vc_min_ver=14.0); env = ei.return_env(); env['vc_ver'] = ei.vc_ver; env['vs_ver'] = ei.vs_ver; env['arch'] = ei.pi.arch; env['py_ver'] = sys.version_info[:2]; print(env)"' failed with exit code 1.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Python311\Lib\site-packages\setuptools\msvc.py", line 1120, in __init__
self.si = SystemInfo(self.ri, vc_ver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\setuptools\msvc.py", line 596, in __init__
vc_ver or self._find_latest_available_vs_ver())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\setuptools\msvc.py", line 610, in _find_latest_available_vs_ver
raise distutils.errors.DistutilsPlatformError(
distutils.errors.DistutilsPlatformError: No Microsoft Visual C++ version found
Finished command: build_wx (0m1.80s)
Finished command: build (0m1.80s)
WARNING: Building this way assumes that all generated files have been
generated already. If that is not the case then use build.py directly
to generate the source and perform the build stage. You can use
--skip-build with the bdist_* or install commands to avoid this
message and the wxWidgets and Phoenix build steps in the future.
"C:\Python311\python.exe" -u build.py build
Command '"C:\Python311\python.exe" -u build.py build' failed with exit code 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> wxpython
I am trying to install the python package py-pde.
My current python version is 3.9.
I pip install using the command 'pip install py-pde' on the terminal.
However, when I try to install it on my IDE - PyCharm - I get this error:
Collecting py-pde
Using cached py_pde-0.27.1-py3-none-any.whl (269 kB)
Requirement already satisfied: matplotlib>=3.1.0 in /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages (from py-pde) (3.6.2)
Collecting numba>=0.56.0
Using cached numba-0.56.4.tar.gz (2.4 MB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [8 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/private/var/folders/sl/b99vml7s45q3zx3wb1fqvq240000gp/T/pip-install-pu5ucxpg/numba_1e4a8190083b40fba0897686608f79d0/setup.py", line 51, in <module>
_guard_py_ver()
File "/private/var/folders/sl/b99vml7s45q3zx3wb1fqvq240000gp/T/pip-install-pu5ucxpg/numba_1e4a8190083b40fba0897686608f79d0/setup.py", line 48, in _guard_py_ver
raise RuntimeError(msg.format(cur_py, min_py, max_py))
RuntimeError: Cannot install on Python version 3.11.0; only versions >=3.7,<3.11 are supported.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Any ideas what's wrong here?
Specifically, it says can't install on Python 3.11, even though I checked my python version using pip --version to be 3.9.
Not sure what's wrong. Help appreciated.
Should be as simple as alt+ctrl+s to go to settings.
Then navigate to Project: "Your project" >> Python Interpreter. Then just browse to the interpreter you want to use instead of 3.11.
Edit: Here's a link to JetBrains (PyCharm parent company) documentation that covers changing your interpreter.
Some packages give errors when I try to install them using pip install. This is the error when I try to install chatterbot, but some other packages give this error as well:
pip install chatterbot
Collecting chatterbot
Using cached ChatterBot-1.0.5-py2.py3-none-any.whl (67 kB)
Collecting pint>=0.8.1
Downloading Pint-0.19.2.tar.gz (292 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 292.0/292.0 kB 1.6 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting pyyaml<5.2,>=5.1
Using cached PyYAML-5.1.2.tar.gz (265 kB)
Preparing metadata (setup.py) ... done
Collecting spacy<2.2,>=2.1
Using cached spacy-2.1.9.tar.gz (30.7 MB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [35 lines of output]
Collecting setuptools
Using cached setuptools-65.0.1-py3-none-any.whl (1.2 MB)
Collecting wheel<0.33.0,>0.32.0
Using cached wheel-0.32.3-py2.py3-none-any.whl (21 kB)
Collecting Cython
Using cached Cython-0.29.32-py2.py3-none-any.whl (986 kB)
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.6-cp310-cp310-win_amd64.whl (36 kB)
Collecting preshed<2.1.0,>=2.0.1
Using cached preshed-2.0.1.tar.gz (113 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\oguls\AppData\Local\Temp\pip-install-qce7tdof\preshed_546a51fe26c74852ab50db073ad57f1f\setup.py", line 9, in <module>
from distutils import ccompiler, msvccompiler
ImportError: cannot import name 'msvccompiler' from 'distutils' (C:\Users\oguls\AppData\Local\Programs\Python\Python310\lib\site-packages\setuptools\_distutils\__init__.py)
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
× pip subprocess to install build dependencies 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 don't specifically know which packages cause this error, a lot of them install without any problems.
I have tried updating pip, changing environment variables and other possible solutions I've found on the internet, but nothing seems to work.
Edit: The package I am trying to install supports my Python version.
The real error in your case is:
ImportError: cannot import name 'msvccompiler' from 'distutils'
It occured because setuptools has broken distutils in version 65.0.0 (and has already fixed it in version 65.0.2). According to your log, the error occured in your global setuptools installation (see the path in error message), so you need to update it with the following command:
pip install -U setuptools
Those packages, however, may still not get installed or not work properly as the module causing this error doesn't support compiler versions needed for currently supported versions of Python.
Same thing happened with me, it was basically pip's version problem.
Try upgrading pip to latest version --22.3.1 and downgrade the python version from latest version --3.10.00 to 3.9.13...
pip --version check for pip's version
pip install notebook --upgrade -command to update pip to latest version
This worked for me
I’ve been running into the same error message with multiple libraries, not all libraries but randomly.
All I could find here and on other equation boards was that I need to upgrade my pip, it’s upgraded to the max (22.1.2) but I still get the same error, no with the added “WARNING: There was an error checking the latest version of pip.”
So this is what I get when I try to install pyinstaller
pip install pyinstaller
Collecting pyinstaller
Using cached pyinstaller-5.1-py3-none-win_amd64.whl (1.2 MB)
Collecting pefile>=2017.8.1
Using cached pefile-2022.5.30.tar.gz (72 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: pywin32-ctypes>=0.2.0 in d:\program files\spyder\pkgs (from pyinstaller) (0.2.0)
Requirement already satisfied: setuptools in d:\program files\spyder\pkgs (from pyinstaller) (61.2.0)
Collecting altgraph
Using cached altgraph-0.17.2-py2.py3-none-any.whl (21 kB)
Collecting pyinstaller-hooks-contrib>=2021.4
Using cached pyinstaller_hooks_contrib-2022.6-py2.py3-none-any.whl (231 kB)
Collecting future
Using cached future-0.18.2.tar.gz (829 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'error'
Note: you may need to restart the kernel to use updated packages.
error: subprocess-exited-with-error
python setup.py egg_info did not run successfully.
exit code: 1
[6 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\tomer\AppData\Local\Temp\pip-install-01zbu624\future_a521b799a85941e08b0fd94b59c7d89a\setup.py", line 86, in <module>
import src.future
ModuleNotFoundError: No module named 'src'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
Encountered error while generating package metadata.
See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
WARNING: There was an error checking the latest version of pip.
Thank you for your help
Im trying to install tensorflow, using pip install tensorflow. I can install other packages but tensorflow is just not working. This is the error i get:
C:\Users\sebas>python -m pip install tensorflow
Collecting tensorflow
Using cached tensorflow-2.8.0-cp37-cp37m-win_amd64.whl (437.9 MB)
Collecting h5py>=2.9.0
Using cached h5py-3.6.0-cp37-cp37m-win_amd64.whl (2.8 MB)
Collecting tensorboard<2.9,>=2.8
Using cached tensorboard-2.8.0-py3-none-any.whl (5.8 MB)
Collecting termcolor>=1.1.0
Using cached termcolor-1.1.0.tar.gz (3.9 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [6 lines of output]
Traceback (most recent call last):
File "<string", line 36, in <module>
File "pip-setuptools-caller>", line 34, in <module>
File "C:\Users\sebas\AppData\Local\Temp\pip-install-vmfvacm3 \termcolor_be9b831904ce413daecad52b36f017aa\setup.py", line 35, in <module>
from termcolor import VERSION
ModuleNotFoundError: No module named 'termcolor'
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details. \
For people which will have similiar problem (on Windows)
Main problem is termcolor.
It seems it tries to import VERSION from new version (before instalation) but it behaves like it would load older versions which doesn't have VERSION.
You may download termcolor as file .whl from
Unofficial Windows Binaries for Python Extension Packages
and try to install
pip install termcolor‑1.1.0‑py2.py3‑none‑any.whl
If termcolor‑1.1.0‑py2.py3‑none‑any.whl can no longer be found on Unofficial Windows Binaries for Python Extension Packages you may find it here termcolor-whl · PyPI