I can run the project on my local MAC, but when I use the pipeline to build it. I got this error:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-axjgd0da/MarkupSafe/
This project is working well, and I did not update any new lib in it. Even I redeployed to the old branch, it has the same error.
Here are the build logs:
Collecting MarkupSafe==2.1.0 (from -r /usr/src/app/requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/62/0f/52c009332fdadd484e898dc8f2acca0663c1031b3517070fd34ad9c1b64e/MarkupSafe-2.1.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-axjgd0da/MarkupSafe/setup.py", line 65, in <module>
run_setup(True)
File "/tmp/pip-build-axjgd0da/MarkupSafe/setup.py", line 44, in run_setup
ext_modules=ext_modules if with_binary else [],
File "/usr/lib/python3.7/site-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python3.7/distutils/core.py", line 121, in setup
dist.parse_config_files()
File "/usr/lib/python3.7/site-packages/setuptools/dist.py", line 442, in parse_config_files
ignore_option_errors=ignore_option_errors)
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 106, in parse_configuration
meta.parse()
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 382, in parse
section_parser_method(section_options)
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 355, in parse_section
self[name] = value
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 173, in __setitem__
value = parser(value)
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 430, in _parse_version
version = self._parse_attr(value)
File "/usr/lib/python3.7/site-packages/setuptools/config.py", line 305, in _parse_attr
module = import_module(module_name)
File "/usr/lib64/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'markupsafe'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-axjgd0da/MarkupSafe/
The command '/bin/sh -c pip3 install -r $DOCKER_APP_HOME/requirements.txt' returned a non-zero code: 1
make: *** [docker-build] Error 1
It is a version problem.
The current version is 2.1.0, which I downgraded to Markupsafe==2.0.1. I added the "Markupsafe==2.0.1" in the requirements.txt, then I don't have the problem anymore.
Related
I tried installing the AioHttp package, as seen in the extract below. The installation failed with the multidict module.
root#ava:/home/cliquant/server/ava# pip3 install aiohttp
Collecting aiohttp
Using cached https://files.pythonhosted.org/packages/ff/4f/62d9859b7d4e6dc32feda67815c5f5ab4421e6909e48cbc970b6a40d60b7/aiohttp-3.8.3.tar.gz
Complete output from command python setup.py egg_info:
*********************
* Accelerated build *
*********************
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-0b29nbfp/aiohttp/setup.py", line 54, in <module>
setup(**setup_kwargs)
File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 129, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 121, in setup
dist.parse_config_files()
File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 494, in parse_config_files
ignore_option_errors=ignore_option_errors)
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 106, in parse_configuration
meta.parse()
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 382, in parse
section_parser_method(section_options)
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 355, in parse_section
self[name] = value
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 173, in __setitem__
value = parser(value)
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 430, in _parse_version
version = self._parse_attr(value)
File "/usr/lib/python3/dist-packages/setuptools/config.py", line 305, in _parse_attr
module = import_module(module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/tmp/pip-build-0b29nbfp/aiohttp/aiohttp/__init__.py", line 5, in <module>
from . import hdrs as hdrs
File "/tmp/pip-build-0b29nbfp/aiohttp/aiohttp/hdrs.py", line 8, in <module>
from multidict import istr
ModuleNotFoundError: No module named 'multidict'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-0b29nbfp/aiohttp/`
I got error when installing aiohttp with pip3.
How can I fix this?
NB: I can't find in google about it...
Google came to your aid narrowing down on the ModuleNotFoundError: No module named 'multidict'
To resolve, install the multidict module.
python3 -m pip install multidict or
pip3 install multidict
See this GitHub issue #277, and
this SO question
[Edit] For completeness, ensure you are installing in the correct environment env.
Also, check the version(s) of python installed on the system.
when using pip install pandas
An error occurs as follows:
Collecting pandas
Using cached pandas-1.5.2.tar.gz (5.2 MB)
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
╰─> [28 lines of output]
Traceback (most recent call last):
File "d:\py\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 351, in
main()
File "d:\py\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "d:\py\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
File "d:\py\lib\site-packages\pip_vendor\pep517\in_process_in_process.py", line 77, in build_backend
obj = import_module(mod_path)
File "d:\py\lib\importlib_init.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in call_with_frames_removed
File "C:\Users\zijie\AppData\Local\Temp\pip-build-env-kqsd82rz\overlay\Lib\site-packages\setuptools_init.py", line 18, in
from setuptools.dist import Distribution
File "C:\Users\zijie\AppData\Local\Temp\pip-build-env-kqsd82rz\overlay\Lib\site-packages\setuptools\dist.py", line 47, in
from . import _entry_points
File "C:\Users\zijie\AppData\Local\Temp\pip-build-env-kqsd82rz\overlay\Lib\site-packages\setuptools_entry_points.py", line 43, in
def validate(eps: metadata.EntryPoints):
AttributeError: module 'importlib.metadata' has no attribute 'EntryPoints'
[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.
py:3.10.0
os:windows11
Does anyone know how to solve the problem? Thanks!
I tried several times but it doesn't work.
Have you tried:
pip3 install pandas?
This question already has an answer here:
msys2/mingw64: pip: VC 6.0 is not supported by this module
(1 answer)
Closed last month.
This is my 40 line error code
error: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
Traceback (most recent call last):
File "C:\msys64\mingw64\lib\python3.9\site-packages\pip_vendor\pep517\in_process_in_process.py", line 351, in
main()
File "C:\msys64\mingw64\lib\python3.9\site-packages\pip_vendor\pep517\in_process_in_process.py", line 333, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "C:\msys64\mingw64\lib\python3.9\site-packages\pip_vendor\pep517\in_process_in_process.py", line 112, in get_requires_for_build_wheel
backend = _build_backend()
File "C:\msys64\mingw64\lib\python3.9\site-packages\pip_vendor\pep517\in_process_in_process.py", line 77, in build_backend
obj = import_module(mod_path)
File "C:\msys64\mingw64\lib\python3.9\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 972, in _find_and_load_unlocked
File "", line 228, in _call_with_frames_removed
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in load_unlocked
File "", line 850, in exec_module
File "", line 228, in call_with_frames_removed
File "C:\Users\abhij\AppData\Local\Temp\pip-build-env-g0qzuyap\overlay\lib\python3.9\site-packages\setuptools_init.py", line 242, in
monkey.patch_all()
File "C:\Users\abhij\AppData\Local\Temp\pip-build-env-g0qzuyap\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 99, in patch_all
patch_for_msvc_specialized_compiler()
File "C:\Users\abhij\AppData\Local\Temp\pip-build-env-g0qzuyap\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 162, in patch_for_msvc_specialized_compiler
patch_func(*msvc9('find_vcvarsall'))
File "C:\Users\abhij\AppData\Local\Temp\pip-build-env-g0qzuyap\overlay\lib\python3.9\site-packages\setuptools\monkey.py", line 149, in patch_params
mod = import_module(mod_name)
File "C:\msys64\mingw64\lib\python3.9\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 850, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\Users\abhij\AppData\Local\Temp\pip-build-env-g0qzuyap\overlay\lib\python3.9\site-packages\setuptools_distutils\msvc9compiler.py", line 295, in
raise DistutilsPlatformError("VC %0.1f is not supported by this module" % VERSION)
distutils.errors.DistutilsPlatformError: VC 6.0 is not supported by this module
[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 tried looking online and usually similar errors have missing files or packages so now I'm just expecting to know what's wrong with my pip installation and what fix I can get since when I try to import in IDLE after this it doesn't work
try this
pip install numpy
or
conda install numpy
it works with WIN/MAC/Linux
try to reload or change interpreter
and if nothing will work specify your question more precisely
This week I started working home and tried installing my project on my PC but it won't work.
I cloned the git repo, installed MySQL Workbench and Server and stuff, installed Visual C++ stuffs
and loads of modules from my requirements.txt.
But when I try to run ./manage.py migrate it spits out this:
$ py manage.py migrate
Traceback (most recent call last):
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\db\backends\mysql\base.py", line 15, in <module>
import MySQLdb as Database
ModuleNotFoundError: No module named 'MySQLdb'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\lisa-\projects\register\manage.py", line 22, in <module>
main()
File "C:\Users\lisa-\projects\register\manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\core\management\__init__.py", line 419, in execute_from_command_line
utility.execute()
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\core\management\__init__.py", line 395, in execute
django.setup()
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\apps\registry.py", line 114, in populate
app_config.import_models()
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\apps\config.py", line 301, in import_models
self.models_module = import_module(models_module_name)
File "C:\Users\lisa-\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\contrib\auth\models.py", line 3, in <module>
from django.contrib.auth.base_user import AbstractBaseUser, BaseUserManager
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\contrib\auth\base_user.py", line 48, in <module>
class AbstractBaseUser(models.Model):
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\db\models\base.py", line 122, in __new__
new_class.add_to_class('_meta', Options(meta, app_label))
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\db\models\base.py", line 326, in add_to_class
value.contribute_to_class(cls, name)
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\db\models\options.py", line 207, in contribute_to_class
self.db_table = truncate_name(self.db_table, connection.ops.max_name_length())
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\utils\connection.py", line 15, in __getattr__
return getattr(self._connections[self._alias], item)
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\utils\connection.py", line 62, in __getitem__
conn = self.create_connection(alias)
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\db\utils.py", line 204, in create_connection
backend = load_backend(db['ENGINE'])
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\db\utils.py", line 111, in load_backend
return import_module('%s.base' % backend_name)
File "C:\Users\lisa-\AppData\Local\Programs\Python\Python310\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "C:\Users\lisa-\projects\register\venv\lib\site-packages\django\db\backends\mysql\base.py", line 17, in <module>
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module.
Did you install mysqlclient?
Now I did install mysqlclient:
$ pip install mysqlclient
Collecting mysqlclient
Using cached mysqlclient-2.1.0-cp310-cp310-win_amd64.whl (180 kB)
Installing collected packages: mysqlclient
Successfully installed mysqlclient-2.1.0
All of this is happening with a newly made venv using python 3.10, Django 3.2.7 and SQL Server 8.0
I googled about 2 hours which didn't help at all, because all I could find was "use pip install mysqlclient", which I obviously did. Sometimes I find things like "install using a wheel file". But I can't find a wheel file for 3.10. Or "use pip install mysql-python" or something like that but then I get an error saying I need Visual C++ 14.0, which I'm pretty sure I have...
So, I'm lost. Please please help me out.
I'm having trouble figuring this one out -- when trying to install a package (zipline in this case), it's struggling to find the setuptools.build_meta file, which I DO HAVE in the site-packages\setuptools directory. As ignorant as I am, I tried dropping this file into the site-packages\pip_vendor\pep517 directly with no change. I'm sure this is simple, but I'm not seeing it. Any help would be appreciated!
The trace back is below.
ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\cli\base_command.py", line 186, in _main
status = self.run(options, args)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\commands\install.py", line 331, in run
resolver.resolve(requirement_set)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\legacy_resolve.py", line 177, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\legacy_resolve.py", line 333, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\legacy_resolve.py", line 282, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\operations\prepare.py", line 516, in prepare_linked_requirement
req, self.req_tracker, self.finder, self.build_isolation,
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\operations\prepare.py", line 95, in _get_prepared_distribution
abstract_dist.prepare_distribution_metadata(finder, build_isolation)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\distributions\sdist.py", line 38, in prepare_distribution_metadata
self._setup_isolation(finder)
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_internal\distributions\sdist.py", line 96, in _setup_isolation
reqs = backend.get_requires_for_build_wheel()
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_vendor\pep517\wrappers.py", line 152, in get_requires_for_build_wheel
'config_settings': config_settings
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_vendor\pep517\wrappers.py", line 255, in _call_hook
raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
File "C:\Users\justjo\PycharmProjects\python35_venv\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 63, in _build_backend
obj = import_module(mod_path)
File "C:\Program Files\Python35\lib\importlib\__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 985, in _gcd_import
File "<frozen importlib._bootstrap>", line 968, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
ImportError: No module named 'setuptools.build_meta'
So for anyone having the same error I solved this by downloading the package directly and deleting the pyproject.toml file, then cd path\setup.py and "pip install ." in a terminal/cmd.
In my case, i downgraded my pip version to 9.0.1 using python -m pip install pip==9.0.1 and it worked for me
I resolved it by upgrading setuptools version to the latest:
sudo /usr/bin/python3.9 /usr/bin/pip3 install setuptools==58.0.4
Other versions:
/usr/bin/python3.9 /usr/bin/pip3 --version
pip 20.0.2 from /usr/lib/python3.9/dist-packages/pip (python 3.9)
/usr/bin/python3.9 --version
Python 3.9.5
lsb_release -d
Description: Ubuntu 20.04.2 LTS
uname -srvi
Linux 4.4.0-19041-Microsoft #1237-Microsoft Sat Sep 11 14:32:00 PST 2021 x86_64