Unable to install dotenv on Windows - python

I never thought I'd be using Stack Overflow, but here I am!
I am unable to install DotEnv on Windows, when I execute pip install dotenv with its optional flags, this error is thrown:
Collecting dotenv
Using cached dotenv-0.0.5.tar.gz (2.4 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Damian Freeman\\AppData\\Local\\Temp\\pip-install-bdy5mww4\\dotenv\\setup.py'"'"'; __file__='"'"'C:\\Users\\Damian Freeman\\AppData\\Local\\Temp\\pip-install-bdy5mww4\\dotenv\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Damian Freeman\AppData\Local\Temp\pip-pip-egg-info-k9desg5s'
cwd: C:\Users\Damian Freeman\AppData\Local\Temp\pip-install-bdy5mww4\dotenv\
Complete output (52 lines):
WARNING: The wheel package is not available.
ERROR: Command errored out with exit status 1:
command: 'c:\python38\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Damian Freeman\\AppData\\Local\\Temp\\pip-wheel-djm3svo6\\distribute\\setup.py'"'"'; __file__='"'"'C:\\Users\\Damian Freeman\\AppData\\Local\\Temp\\pip-wheel-djm3svo6\\distribute\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Damian Freeman\AppData\Local\Temp\pip-pip-egg-info-s15217m9'
cwd: C:\Users\Damian Freeman\AppData\Local\Temp\pip-wheel-djm3svo6\distribute\
Complete output (15 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Damian Freeman\AppData\Local\Temp\pip-wheel-djm3svo6\distribute\setuptools\__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "C:\Users\Damian Freeman\AppData\Local\Temp\pip-wheel-djm3svo6\distribute\setuptools\extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "C:\Users\Damian Freeman\AppData\Local\Temp\pip-wheel-djm3svo6\distribute\setuptools\dist.py", line 7, in <module>
from setuptools.command.install import install
File "C:\Users\Damian Freeman\AppData\Local\Temp\pip-wheel-djm3svo6\distribute\setuptools\command\__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "C:\Users\Damian Freeman\AppData\Local\Temp\pip-wheel-djm3svo6\distribute\setuptools\command\install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "C:\Users\Damian Freeman\AppData\Local\Temp\pip-wheel-djm3svo6\distribute\pkg_resources.py", line 1518, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Traceback (most recent call last):
File "c:\python38\lib\site-packages\setuptools\installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "c:\python38\lib\subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c:\\python38\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\DAMIAN~1\\AppData\\Local\\Temp\\tmpfnchk15m', '--quiet', 'distribute']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\Damian Freeman\AppData\Local\Temp\pip-install-bdy5mww4\dotenv\setup.py", line 13, in <module>
setup(name='dotenv',
File "c:\python38\lib\site-packages\setuptools\__init__.py", line 143, in setup
_install_setup_requires(attrs)
File "c:\python38\lib\site-packages\setuptools\__init__.py", line 138, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\python38\lib\site-packages\setuptools\dist.py", line 695, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\python38\lib\site-packages\pkg_resources\__init__.py", line 781, in resolve
dist = best[req.key] = env.best_match(
File "c:\python38\lib\site-packages\pkg_resources\__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "c:\python38\lib\site-packages\pkg_resources\__init__.py", line 1078, in obtain
return installer(requirement)
File "c:\python38\lib\site-packages\setuptools\dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "c:\python38\lib\site-packages\setuptools\installer.py", line 130, in fetch_build_egg
raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['c:\\python38\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\DAMIAN~1\\AppData\\Local\\Temp\\tmpfnchk15m', '--quiet', 'distribute']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
However, I read on an older thread to install DotEnv with pip install python-dotenv but said "solution" was not a fix to my problem.
Any help is appreciated!

You are installing dotenv instead of python-dotenv.Use this command:
pip install -U python-dotenv
Refer this issue

Related

How can I fix Heroku error: "Command errored out with exit status 1"?

I want to host my Discord Bot on Heroku for free. I tried building it but I get an error while hosting the bot, that I can't solve.
This is the activity log of Discord Bot while publishing it into Heroku:
Building on the Heroku-20 stack
Using buildpack: Heroku/python
Python app detected
No Python version was specified. Using the same version as the last build: python-3.9.5
To use a different version, see: https://devcenter.heroku.com/articles/python-runtimes
Requirements file has been changed, clearing cached dependencies
Installing python-3.9.5
Installing pip 20.2.4, setuptools 47.1.1 and wheel 0.36.2
Installing SQLite3
Installing requirements with pip
Collecting setuptools==49.6.0
Downloading setuptools-49.6.0-py3-none-any.whl (803 kB)
Collecting discord.py==1.7.2
Downloading discord.py-1.7.2-py3-none-any.whl (786 kB)
Collecting discord
Downloading discord-1.0.1-py3-none-any.whl (1.1 kB)
Collecting dotenv
Downloading dotenv-0.0.5.tar.gz (2.4 kB)
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-06xhzdfv/dotenv/setup.py'"'"'; __file__='"'"'/tmp/pip-install-06xhzdfv/dotenv/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-m_r1ttd_
cwd: /tmp/pip-install-06xhzdfv/dotenv/
Complete output (51 lines):
ERROR: Command errored out with exit status 1:
command: /app/.heroku/python/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-9yg4cjho/distribute/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-9yg4cjho/distribute/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-3dj58cd9
cwd: /tmp/pip-wheel-9yg4cjho/distribute/
Complete output (15 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-wheel-9yg4cjho/distribute/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/tmp/pip-wheel-9yg4cjho/distribute/setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "/tmp/pip-wheel-9yg4cjho/distribute/setuptools/dist.py", line 7, in <module>
from setuptools.command.install import install
File "/tmp/pip-wheel-9yg4cjho/distribute/setuptools/command/__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "/tmp/pip-wheel-9yg4cjho/distribute/setuptools/command/install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/tmp/pip-wheel-9yg4cjho/distribute/pkg_resources.py", line 1518, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Traceback (most recent call last):
File "/app/.heroku/python/lib/python3.9/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
subprocess.check_call(cmd)
File "/app/.heroku/python/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/app/.heroku/python/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp6e4wiu5n', '--quiet', 'distribute']' returned non-zero exit status 1.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-06xhzdfv/dotenv/setup.py", line 13, in <module>
setup(name='dotenv',
File "/app/.heroku/python/lib/python3.9/site-packages/setuptools/__init__.py", line 160, in setup
_install_setup_requires(attrs)
File "/app/.heroku/python/lib/python3.9/site-packages/setuptools/__init__.py", line 155, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/app/.heroku/python/lib/python3.9/site-packages/setuptools/dist.py", line 695, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/app/.heroku/python/lib/python3.9/site-packages/pkg_resources/__init__.py", line 781, in resolve
dist = best[req.key] = env.best_match(
File "/app/.heroku/python/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "/app/.heroku/python/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1078, in obtain
return installer(requirement)
File "/app/.heroku/python/lib/python3.9/site-packages/setuptools/dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "/app/.heroku/python/lib/python3.9/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
raise DistutilsError(str(e))
distutils.errors.DistutilsError: Command '['/app/.heroku/python/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp6e4wiu5n', '--quiet', 'distribute']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
! Push rejected, failed to compile Python app.
! Push failed
You are installing the wrong package. Change dotenv to python-dotenv in your requirements.txt file. See this issue for more information. https://github.com/theskumar/python-dotenv/issues/113

Python package install failing

I'm trying to install the rpy2 package and can't get past a "The system cannot find the file specified". I'm not sure what file it can't find or why it isn't able to install (it is downloading the tar.gz file but won't install into the env).
I'm running on windows with python 3.6.8
Collecting rpy2
Using cached rpy2-3.3.6.tar.gz (179 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\paulj\\AppData\\Local\\Temp\\pip-install-ih4008f_\\rpy2\\setup.py'"'"'; __file__='"'"'C:\\Users\\paulj\\AppData\\Local\\Temp\\pip-install-ih4008f_\\rpy2\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\paulj\AppData\Local\Temp\pip-pip-egg-info-47z8bowi'
cwd: C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\
Complete output (20 lines):
cffi mode: CFFI_MODE.ANY
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\setup.py", line 115, in <module>
c_extension_status = get_r_c_extension_status()
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\setup.py", line 99, in get_r_c_extension_status
*situation.get_r_flags(r_home, '--ldflags')
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\rpy2\situation.py", line 210, in get_r_flags
allow_empty=False)))
File "C:\Users\paulj\AppData\Local\Temp\pip-install-ih4008f_\rpy2\rpy2\situation.py", line 179, in _get_r_cmd_config
universal_newlines=True
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 356, in check_output
**kwargs).stdout
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 423, in run
with Popen(*popenargs, **kwargs) as process:
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "c:\program files\alteryx\bin\miniconda3\envs\jupytertool_venv\lib\subprocess.py", line 1017, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output. when trying to install dotenv

I'm trying to install dotenv for my discord bot with pip3 install dotenv but it keeps giving me this error:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-xmobtpdk/dotenv/setup.py'"'"'; __file__='"'"'/tmp/pip-install-xmobtpdk/dotenv/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-xmobtpdk/dotenv/pip-egg-info
cwd: /tmp/pip-install-xmobtpdk/dotenv/
Complete output (51 lines):
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-ts7a2idz/distribute/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-ts7a2idz/distribute/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-vsx7w_h3
cwd: /tmp/pip-wheel-ts7a2idz/distribute/
Complete output (15 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-wheel-ts7a2idz/distribute/setuptools/__init__.py", line 2, in <module>
from setuptools.extension import Extension, Library
File "/tmp/pip-wheel-ts7a2idz/distribute/setuptools/extension.py", line 5, in <module>
from setuptools.dist import _get_unpatched
File "/tmp/pip-wheel-ts7a2idz/distribute/setuptools/dist.py", line 7, in <module>
from setuptools.command.install import install
File "/tmp/pip-wheel-ts7a2idz/distribute/setuptools/command/__init__.py", line 8, in <module>
from setuptools.command import install_scripts
File "/tmp/pip-wheel-ts7a2idz/distribute/setuptools/command/install_scripts.py", line 3, in <module>
from pkg_resources import Distribution, PathMetadata, ensure_directory
File "/tmp/pip-wheel-ts7a2idz/distribute/pkg_resources.py", line 1518, in <module>
register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Traceback (most recent call last):
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/installer.py", line 126, in fetch_build_egg
subprocess.check_call(cmd)
File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpa_3vnder', '--quiet', 'distribute']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-xmobtpdk/dotenv/setup.py", line 13, in <module>
setup(name='dotenv',
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 152, in setup
_install_setup_requires(attrs)
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/dist.py", line 673, in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "/home/fanjin/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 764, in resolve
dist = best[req.key] = env.best_match(
File "/home/fanjin/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1049, in best_match
return self.obtain(req, installer)
File "/home/fanjin/.local/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1061, in obtain
return installer(requirement)
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/dist.py", line 732, in fetch_build_egg
return fetch_build_egg(self, req)
File "/home/fanjin/.local/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpa_3vnder', '--quiet', 'distribute']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I'm using Linux and I already tried sudo pip3 install --upgrade pip setuptools wheel and tried install dotenv again but that didn't work. I also tried sudo easy_install -U setuptools but that didn't work either. I also tried installing another module and it worked, but not for dotenv.
Oh it's because the package is called python-dotenv not dotenv.

PyCharm can't install kiwisolver

I am trying to install kiwisolver to later import into a python file. Whenever I try to install it it doesn't work. Here is an exerpt from the terminal that insludes the entire error message:
pip install kiwisolver
Collecting kiwisolver
Using cached kiwisolver-1.2.0.tar.gz (52 kB)
ERROR: Command errored out with exit status 1:
command: 'c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\scripts\python.exe' -c 'import sys, setuptools
, tokenize; sys.argv[0] = '"'"'C:\\Users\\krzys\\AppData\\Local\\Temp\\pip-install-7g7nerff\\kiwisolver\\setup.py'"'
"'; __file__='"'"'C:\\Users\\krzys\\AppData\\Local\\Temp\\pip-install-7g7nerff\\kiwisolver\\setup.py'"'"';f=getattr(
tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile
(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\krzys\AppData\Local\Temp\pip-pip-egg-info-lzzrvcrw'
cwd: C:\Users\krzys\AppData\Local\Temp\pip-install-7g7nerff\kiwisolver\
Complete output (44 lines):
WARNING: The wheel package is not available.
ERROR: Command errored out with exit status 1:
command: 'c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\scripts\python.exe' -u -c 'import sys, setup
tools, tokenize; sys.argv[0] = '"'"'C:\\Users\\krzys\\AppData\\Local\\Temp\\pip-wheel-68n7nybw\\cppy\\setup.py'"'"';
__file__='"'"'C:\\Users\\krzys\\AppData\\Local\\Temp\\pip-wheel-68n7nybw\\cppy\\setup.py'"'"';f=getattr(tokenize, '
"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __fi
le__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\krzys\AppData\Local\Temp\pip-wheel-wh_c02y4'
cwd: C:\Users\krzys\AppData\Local\Temp\pip-wheel-68n7nybw\cppy\
Complete output (6 lines):
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: setup.py --help [cmd1 cmd2 ...]
or: setup.py --help-commands
or: setup.py cmd --help
error: invalid command 'bdist_wheel'
----------------------------------------
ERROR: Failed building wheel for cppy
ERROR: Failed to build one or more wheels
Traceback (most recent call last):
File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\installer.py", line
126, in fetch_build_egg
subprocess.check_call(cmd)
File "C:\Users\krzys\AppData\Local\Programs\Python\Python39\lib\subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['c:\\users\\krzys\\pycharmprojects\\possiblyworkingcv2\\venv\\scripts\\
python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\krzys\\AppData\\Loc
al\\Temp\\tmp95axqdwj', '--quiet', 'cppy>=1.1.0']' returned non-zero exit status 1.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\krzys\AppData\Local\Temp\pip-install-7g7nerff\kiwisolver\setup.py", line 59, in <module>
setup(
File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\__init__.py", line 1
52, in setup
_install_setup_requires(attrs)
File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\__init__.py", line 1
47, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\dist.py", line 673,
in fetch_build_eggs
resolved_dists = pkg_resources.working_set.resolve(
File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\pkg_resources\__init__.py", lin
e 764, in resolve
dist = best[req.key] = env.best_match(
File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\pkg_resources\__init__.py", lin
e 1049, in best_match
return self.obtain(req, installer)
File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\pkg_resources\__init__.py", lin
e 1061, in obtain
return installer(requirement)
File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\dist.py", line 732,
in fetch_build_egg
return fetch_build_egg(self, req)
File "c:\users\krzys\pycharmprojects\possiblyworkingcv2\venv\lib\site-packages\setuptools\installer.py", line
128, in fetch_build_egg
raise DistutilsError(str(e)) from e
distutils.errors.DistutilsError: Command '['c:\\users\\krzys\\pycharmprojects\\possiblyworkingcv2\\venv\\scripts
\\python.exe', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', 'C:\\Users\\krzys\\AppData\\L
ocal\\Temp\\tmp95axqdwj', '--quiet', 'cppy>=1.1.0']' returned non-zero exit status 1.
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
What do I need to do to install kiwisolver?
I am using PyCharm Community Edition 2020.2.3 with Python 3.9(venv) interpreter.
Not sure if there are wheels out for kiwisolver in Python 3.9, check here and download and install the correct one if there is one. If not download a 3.8 Python version.

Unable to install the new tflite-support using pip

Following this link, I've been trying to install the tflite-support module using pip. I get the following error:
ERROR: Command errored out with exit status 1:
command: /usr/local/opt/python/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/setup.py'"'"'; __file__='"'"'/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/pip-egg-info
cwd: /private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/
Complete output (27 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/setup.py", line 178, in <module>
zip_safe=False,
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/__init__.py", line 143, in setup
_install_setup_requires(attrs)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/__init__.py", line 138, in _install_setup_requires
dist.fetch_build_eggs(dist.setup_requires)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/dist.py", line 698, in fetch_build_eggs
replace_conflicting=True,
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/pkg_resources/__init__.py", line 783, in resolve
replace_conflicting=replace_conflicting
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/pkg_resources/__init__.py", line 1066, in best_match
return self.obtain(req, installer)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/pkg_resources/__init__.py", line 1078, in obtain
return installer(requirement)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/dist.py", line 754, in fetch_build_egg
return fetch_build_egg(self, req)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/installer.py", line 133, in fetch_build_egg
wheel.install_as_egg(dist_location)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/wheel.py", line 103, in install_as_egg
self._install_as_egg(destination_eggdir, zf)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/wheel.py", line 111, in _install_as_egg
self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
File "/Users/anupamchugh/Library/Python/3.7/lib/python/site-packages/setuptools/wheel.py", line 132, in _convert_metadata
os.mkdir(destination_eggdir)
FileExistsError: [Errno 17] File exists: '/private/var/folders/gg/1zr67t6d11lczcdmc7tc3y000000gn/T/pip-install-tfso4suc/tflite-support/.eggs/pybind11-2.4.3-py3.7.egg'
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Any leads? I know similar questions have been asked before, but no luck with those answers
Turning the comment into an answer:
This looks like a regression in setuptools. Downgrade to 41:
$ pip install --upgrade 'setuptools<42'
Now (ideally) preinstall pybind11 to avoid missing headers when building the tflite-support wheel:
$ pip install 'pybind11>=2.4'
Now installing tflite-support should succeed without any intermediate errors:
$ pip install tflite-support

Categories

Resources