I am trying to install zappa for my Django project with the pip install zappa command.
For some reason I am getting the error message:
Collecting kappa==0.6.0
Using cached kappa-0.6.0.tar.gz (29 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
[10 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\F\AppData\Local\Temp\pip-install-0z9s37z_\kappa_3e41fa04962841afbbe1bfd266342d06\setup.py", line 54, in <module>
run_setup()
File "C:\Users\F\AppData\Local\Temp\pip-install-0z9s37z_\kappa_3e41fa04962841afbbe1bfd266342d06\setup.py", line 22, in run_setup
long_description=open_file('README.rst').read(),
File "C:\users\F\appdata\local\programs\python\python310\lib\encodings\cp1253.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x9c in position 2341: character maps to <undefined>
[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.
I am using Windows 10 and Python 3.10.1 .
[Edit] my pip list results are:
(venv) C:\Users\F>pip list
Package Version
------------------------- ---------
argcomplete 2.0.0
arrow 1.2.1
asgiref 3.5.0
atomicwrites 1.4.0
attrs 21.4.0
awsebcli 3.20.3
binaryornot 0.4.4
boto3 1.21.19
botocore 1.24.19
cement 2.8.2
certifi 2021.10.8
cffi 1.15.0
cfn-flip 1.3.0
chardet 4.0.0
charset-normalizer 2.0.12
click 8.0.4
colorama 0.4.3
cookiecutter 1.7.3
coverage 6.3.2
cryptography 36.0.1
defusedxml 0.7.1
distlib 0.3.4
Django 4.0.3
django-cors-headers 3.11.0
django-countries 7.2.1
django-filter 21.1
django-modeladmin-reorder 0.3.1
django-simple-history 3.0.0
django-tailwind 3.0.1
djangorestframework 3.13.1
djangorestframework-csv 2.1.1
drf-extensions 0.7.1
drf-spectacular 0.21.2
drf-spectacular-sidecar 2022.3.14
durationpy 0.5
factory-boy 3.2.1
Faker 13.3.2
filelock 3.4.2
future 0.18.2
hjson 3.0.2
idna 3.3
inflection 0.5.1
iniconfig 1.1.1
isodate 0.6.1
Jinja2 3.1.2
jinja2-time 0.2.0
jmespath 0.10.0
jsonschema 4.4.0
jwt 1.3.1
Markdown 3.3.6
MarkupSafe 2.0.1
mixer 7.2.2
names-dataset 3.0.2
npm 0.1.1
oauthlib 3.2.0
optional-django 0.1.0
packaging 21.3
pathspec 0.9.0
pendulum 2.1.2
pip 22.0.4
pipenv 2022.1.8
placebo 0.9.0
platformdirs 2.5.2
pluggy 1.0.0
poyo 0.5.0
psycopg2-binary 2.9.3
py 1.11.0
pycountry 22.3.5
pycparser 2.21
Pygments 2.11.2
PyJWT 2.3.0
pymongo 3.11.1
PyPardot 0.1
PyPardotSF 0.1.0
pyparsing 3.0.7
pypiwin32 223
pyrsistent 0.18.1
pytest 7.1.1
pytest-cov 3.0.0
pytest-django 4.5.2
python-dateutil 2.8.2
python-slugify 6.1.1
python3-openid 3.2.0
pytz 2021.3
pytzdata 2020.1
pywin32 303
PyYAML 6.0
requests 2.27.1
requests-oauthlib 1.3.1
s3transfer 0.5.2
semantic-version 2.8.5
setuptools 62.1.0
six 1.16.0
social-auth-app-django 5.0.0
social-auth-core 4.2.0
sqlparse 0.4.2
termcolor 1.1.0
text-unidecode 1.3
toml 0.10.2
tomli 2.0.1
tqdm 4.63.0
troposphere 3.2.2
tzdata 2021.5
unicodecsv 0.14.1
Unidecode 1.3.4
uritemplate 4.1.1
urllib3 1.26.8
virtualenv 20.14.1
virtualenv-clone 0.5.7
wcwidth 0.1.9
Werkzeug 2.0.3
wheel 0.37.1
wsgi-request-logger 0.4.6
xmltodict 0.12.0
With pip pip -V being pip 22.0.4 from C:\Users\F\...\pip (python 3.10)
I haven't found any similar issues online so I could use some help to solve it.
Related
I am trying to pip install dbt-sqlserver and am having issues downloading or building the wheel for pyodbc. I am using python version 3.11 and on a virtual machine. I have not had this issue previously on my local machine.
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.34.31933\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
It then details that this is a legacy install failure. I previously downloaded the Microsoft Visual Studio build tools based off a prior error and these are the packages selected.
I am expecting to hopefully download dbt-sqlserver. I have tried multiple different things from stackoverflow to no avail.
Here is my current pip list covering everything within my virtual environment on my VM.
Package Version
------------------------ -----------
agate 1.7.0
aiosqlite 0.18.0
alembic 1.9.2
anyio 3.6.2
apprise 1.2.1
asgi-lifespan 2.0.0
asyncpg 0.27.0
attrs 22.2.0
Babel 2.11.0
betterproto 1.2.5
cachetools 5.3.0
certifi 2022.12.7
cffi 1.15.1
charset-normalizer 3.0.1
click 8.1.3
cloudpickle 2.2.1
colorama 0.4.6
coolname 2.2.0
croniter 1.3.8
cryptography 39.0.0
dateparser 1.1.6
dbt-core 1.4.1
dbt-extractor 0.4.1
docker 6.0.1
fastapi 0.89.1
fsspec 2023.1.0
future 0.18.3
google-auth 2.16.0
graphql-core 3.2.3
greenlet 2.0.2
griffe 0.25.4
grpclib 0.4.3
h11 0.14.0
h2 4.1.0
hologram 0.0.15
hpack 4.0.0
httpcore 0.16.3
httpx 0.23.3
hyperframe 6.0.1
idna 3.4
isodate 0.6.1
Jinja2 3.1.2
jsonpatch 1.32
jsonpointer 2.3
jsonschema 3.2.0
kubernetes 25.3.0
leather 0.3.4
Logbook 1.5.3
Mako 1.2.4
Markdown 3.4.1
markdown-it-py 2.1.0
MarkupSafe 2.1.2
mashumaro 3.3.1
mdurl 0.1.2
minimal-snowplow-tracker 0.0.2
msgpack 1.0.4
multidict 6.0.4
networkx 2.8.8
oauthlib 3.2.2
orjson 3.8.5
packaging 21.3
parsedatetime 2.4
pathspec 0.10.3
pendulum 2.1.2
pip 23.0
prefect 2.7.10
prefect-dbt 0.2.7
prefect-shell 0.1.3
pyasn1 0.4.8
pyasn1-modules 0.2.8
pycparser 2.21
pydantic 1.10.4
Pygments 2.14.0
pyodbc 4.0.35
pyparsing 3.0.9
pyrsistent 0.19.3
python-dateutil 2.8.2
python-slugify 8.0.0
pytimeparse 1.1.8
pytz 2022.7.1
pytz-deprecation-shim 0.1.0.post0
pytzdata 2020.1
pywin32 305
PyYAML 6.0
readchar 4.0.3
regex 2022.10.31
requests 2.28.2
requests-oauthlib 1.3.1
rfc3986 1.5.0
rich 13.3.1
rsa 4.9
setuptools 67.1.0
sgqlc 16.1
six 1.16.0
sniffio 1.3.0
SQLAlchemy 1.4.46
sqlparse 0.4.3
starlette 0.22.0
stringcase 1.2.0
text-unidecode 1.3
toml 0.10.2
typer 0.7.0
typing_extensions 4.4.0
tzdata 2022.7
tzlocal 4.2
urllib3 1.26.14
uvicorn 0.20.0
websocket-client 1.5.0
Werkzeug 2.2.2
wheel 0.38.4
I am try to implement keyring on a windows system to manage database passwords for connection strings in pyodbc and sqlalchemy. I have tried to ensure the relevant packages from the NameError(s) thrown are installed.
Reason for manually setting the backend in keyring on windows
Here is the code I ran:`
from keyring.backends import Windows
import keyring
keyring.set_keyring(Windows.WinVaultKeyring())
keyring.get_password("Service", "Username")
Here are the errors thrown:
Traceback (most recent call last):
File ".\Python310\lib\site-packages\keyring\backends\Windows.py", line 109, in _get_password
res = win32cred.CredRead(
NameError: name 'win32cred' is not defined
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".\Python310\lib\site-packages\keyring\core.py", line 55, in get_password
return get_keyring().get_password(service_name, username)
File ".\Python310\lib\site-packages\keyring\backends\Windows.py", line 99, in get_password
res = self._get_password(service)
File ".\Python310lib\site-packages\keyring\backends\Windows.py", line 112, in _get_password
except pywintypes.error as e:
NameError: name 'pywintypes' is not defined
Installed packages are listed:
Package
Version
astroid
2.9.3
backcall
0.2.0
certifi
2021.10.8
cffi
1.15.0
charset-normalizer
2.0.12
cloudpickle
2.1.0
colorama
0.4.4
comtypes
1.1.11
cryptography
37.0.2
dask
2022.6.1
executing
0.8.3
fsspec
2022.5.0
greenlet
1.1.2
idna
3.3
ipython-genutils
0.2.0
isort
5.10.1
keyring
23.6.0
lazy-object-proxy
1.7.1
locket
1.0.0
mccabe
0.6.1
mistune
0.8.4
MouseInfo
0.1.3
numpy
1.22.3
opencv-python
4.5.5.64
packaging
21.3
pandas
1.4.1
partd
1.2.0
pickleshare
0.7.5
Pillow
9.1.1
pip
22.1.2
platformdirs
2.5.1
pure-eval
0.2.2
PyAutoGUI
0.9.53
pycparser
2.21
PyGetWindow
0.0.9
pylint
2.12.2
PyMsgBox
1.0.9
pyodbc
4.0.32
pyparsing
3.0.7
pyperclip
1.8.2
PyQt6
6.3.1
PyQt6-Qt6
6.3.1
PyQt6-sip
13.4.0
PyRect
0.2.0
PyScreeze
0.1.28
pytesseract
0.3.9
python-bidi
0.4.2
python-dateutil
2.8.2
pytweening
1.0.4
pytz
2022.1
PyWavelets
1.3.0
pywin32
303
pywin32-ctypes
0.2.0
pywinauto
0.6.8
PyYAML
6
requests
2.27.1
scipy
1.8.0
Send2Trash
1.8.0
setuptools
58.1.0
six
1.16.0
SQLAlchemy
1.4.39
sudo
1.0.0
tifffile
2022.3.16
toml
0.10.2
toolz
0.11.2
torch
1.11.0
torchaudio
0.11.0
torchvision
0.12.0
traitlets
5.1.1
typing_extensions
4.1.1
urllib3
1.26.9
wcwidth
0.2.5
webencodings
0.5.1
wrapt
1.13.3
This was an issue with extra python installations on my device.
I fixed this issue by deleting an extra set of python installations on my computer.
Create venv without admin access python
import keyring
keyring.set_keyring(Windows.WinVaultKeyring())
keyring.get_password("Service", "Username")
keyring.set_password("TestService","TestUser", "TestPassword")
keyring.get_password("TestService", "TestUser")
Prints:
'TestPassword'
Edit, this also fixes the need to set the default keyring.
I can omit: keyring.set_keyring(Windows.WinVaultKeyring())
I have an AWS EMR cluster and all the steps are failing with the error:
'''
ModuleNotFoundError: No module named 'boto3'
'''
Python and pip versions:
'''
python --version
Python 3.7.10
pip --version
pip 20.2.2 from /usr/lib/python3.7/site-packages/pip (python 3.7)
'''
Here's my requirements.txt file:
'''
aiobotocore==1.2.1
aiohttp==3.7.3
aioitertools==0.7.1
astroid==2.5
async-timeout==3.0.1
attrs==20.3.0
avro-python3
avro-validator==1.0.9
aws-encryption-sdk==2.0.0
aws-encryption-sdk-cli==2.1.0
aws-logging-handlers==2.0.5
base64io==1.0.3
boto3==1.16.34
botocore==1.19.63
certifi==2020.12.5
cffi==1.14.5
chardet==3.0.4
configparser==5.0.1
cryptography==3.3.1
cycler==0.10.0
datacompy==0.7.1
DateTime==4.3
deap==1.3.1
decorator==4.4.2
elasticsearch==7.10.1
fsspec==0.8.5
idna==3.1
importlib-metadata==3.4.0
iniconfig==1.1.1
isort==5.7.0
jmespath==0.10.0
joblib==1.0.1
kiwisolver==1.2.0
lazy-object-proxy==1.5.2
matplotlib==3.3.3
mccabe==0.6.1
multidict==5.1.0
networkx==2.5
numpy==1.19.4
packaging==20.9
pandas==1.1.5
patsy==0.5.1
Pillow==8.1.0
pluggy==0.13.1
psycopg2==2.8.6
psycopg2-binary==2.8.6
py==1.10.0
pyarrow==0.17.1
pycparser==2.20
pylint==2.6.0
pyparsing==2.4.7
pytest==6.2.2
python-dateutil==2.8.1
pytz==2021.1
regex==2020.7.14
s3-concat==0.2.1
s3fs==0.5.1
s3transfer==0.3.4
scikit-learn==0.23.2
scikit-posthocs==0.6.6
scipy==1.5.4
seaborn==0.11.0
six==1.15.0
sklearn-deap2==0.2.2
sparkmeasure==0.14.0
statsmodels==0.9.0
threadpoolctl==2.1.0
toml==0.10.2
typed-ast==1.4.2
typing-extensions==3.7.4.3
urllib3==1.26.3
wrapt==1.12.1
xlrd==1.2.0
xmltodict==0.12.0
yarl==1.6.3
zipp==3.4.0
zope.interface==5.2.0
tsfresh==0.18.0
apache-sedona==1.0.1
py4j==0.10.9
shapely==1.7.1
pyspark==3.0.3
numba==0.53.1
'''
This is the command to install the packages:
'''
sudo pip-3.7 --default-timeout=60 install -r /tmp/requirements.txt
'''
Below is the output from "pip list"
'''
Package Version
-------------------------- ---------
aiobotocore 1.2.1
aiohttp 3.7.3
aioitertools 0.7.1
apache-sedona 1.0.1
astroid 2.5
async-timeout 3.0.1
attrs 20.3.0
avro-python3 1.10.2
avro-validator 1.0.9
aws-cfn-bootstrap 2.0
aws-encryption-sdk 2.0.0
aws-encryption-sdk-cli 2.1.0
aws-logging-handlers 2.0.5
base64io 1.0.3
beautifulsoup4 4.9.3
boto 2.49.0
boto3 1.24.20
botocore 1.19.52
certifi 2020.12.5
cffi 1.14.5
chardet 3.0.4
charset-normalizer 2.1.0
click 8.0.3
cloudpickle 2.1.0
configparser 5.0.1
cryptography 3.3.1
cycler 0.10.0
dask 2022.2.0
datacompy 0.7.1
DateTime 4.3
deap 1.3.1
decorator 4.4.2
distributed 2022.2.0
docutils 0.14
elasticsearch 7.10.1
fonttools 4.33.3
fsspec 0.8.5
HeapDict 1.0.1
idna 3.1
importlib-metadata 3.4.0
iniconfig 1.1.1
isort 5.7.0
Jinja2 3.1.2
jmespath 0.10.0
joblib 1.0.1
kiwisolver 1.2.0
lazy-object-proxy 1.5.2
llvmlite 0.38.1
locket 1.0.0
lockfile 0.11.0
lxml 4.6.3
MarkupSafe 2.1.1
matplotlib 3.5.2
matrixprofile 1.1.10
mccabe 0.6.1
msgpack 1.0.4
multidict 5.1.0
mysqlclient 1.4.2
networkx 2.5
nltk 3.6.5
nose 1.3.4
numba 0.53.1
numpy 1.19.4
packaging 20.9
pandas 1.1.5
partd 1.2.0
patsy 0.5.1
Pillow 8.1.0
pip 20.2.2
pluggy 0.13.1
protobuf 3.11.2
psutil 5.9.1
psycopg2 2.8.6
psycopg2-binary 2.8.6
py 1.10.0
py-dateutil 2.2
py4j 0.10.9
pycparser 2.20
pylint 2.6.0
pyparsing 2.4.7
pyspark 3.0.3
pystache 0.5.4
pytest 6.2.2
python-daemon 2.2.3
python-dateutil 2.8.1
python37-sagemaker-pyspark 1.4.1
pytz 2021.1
PyYAML 5.4.1
regex 2020.7.14
requests 2.28.1
s3-concat 0.2.1
s3fs 0.5.1
s3transfer 0.3.4
scikit-learn 0.23.2
scikit-posthocs 0.6.6
scipy 1.5.4
seaborn 0.11.0
setuptools 49.1.3
Shapely 1.8.2
simplejson 3.2.0
six 1.15.0
sklearn-deap2 0.2.2
sortedcontainers 2.4.0
sparkmeasure 0.14.0
statsmodels 0.9.0
stumpy 1.11.1
tblib 1.7.0
threadpoolctl 2.1.0
toml 0.10.2
toolz 0.11.2
tornado 6.1
tqdm 4.62.3
tsfresh 0.18.0
typed-ast 1.4.2
typing-extensions 3.7.4.3
urllib3 1.26.3
windmill 1.6
wrapt 1.12.1
xlrd 1.2.0
xmltodict 0.12.0
yarl 1.6.3
zict 2.2.0
zipp 3.4.0
zope.interface 5.2.0
'''
From the above pip list output, boto3 is installed. Still the steps are failing.
Please help!
if u are using linux try:
$ pip3 install boto3
make sure to rerun without sudo
I am using flask to create user login and I encounter this error when I try to run my program. As you can see I already have email-validtaor installed, so why is it still telling me to install it?
Exception: Install 'email_validator' for email validation support.
This is my pip list that show email-validator installed.
Peters-Air:~ peterkogolo$ pip list
Package Version
backports.entry-points-selectable 1.1.0
bcrypt 3.2.0
blinker 1.4
certifi 2021.10.8
cffi 1.15.0
click 8.0.3
distlib 0.3.3
dnspython 2.2.1
email-validator 1.2.1
filelock 3.3.1
Flask 2.0.2
Flask-Bcrypt 1.0.1
Flask-Login 0.5.0
Flask-Mail 0.9.1
Flask-SQLAlchemy 2.5.1
greenlet 1.1.2
idna 3.3
itsdangerous 2.0.1
Jinja2 3.0.2
MarkupSafe 2.0.1
pip 21.3.1
pipenv 2021.5.29
platformdirs 2.4.0
pycparser 2.21
setuptools 57.4.0
six 1.16.0
SQLAlchemy 1.4.26
virtualenv 20.9.0
virtualenv-clone 0.5.7
Werkzeug 2.0.2
WTForms 3.0.0
I'm quite new in python and faced this issue after the manual installation of the new jsonschema dependency.
$ python /var/www/html/graylog.py
Traceback (most recent call last):
File "/var/www/html/graylog.py", line 18, in <module>
from jsonschema import validate
ImportError: cannot import name 'validate'
Python version 3.6.8
This is the current pip list
Package Version
------------------ --------
attrs 19.3.0
certifi 2019.3.9
chardet 3.0.4
Click 7.0
configparser 5.0.0
Flask 1.0.2
Flask-WTF 0.14.2
grapi 0.1.4
idna 2.8
importlib-metadata 1.6.1
itsdangerous 1.1.0
Jinja2 2.10
jsonschema 3.2.0
M2Crypto 0.35.2
MarkupSafe 1.1.1
Nuitka 0.6.8.3
pip 20.1.1
prometheus-client 0.8.0
PyMySQL 0.9.3
pyrsistent 0.16.0
PySimpleGUI 3.29.0
requests 2.21.0
setuptools 39.2.0
six 1.15.0
urllib3 1.24.1
virtualenv 16.4.3
Werkzeug 0.15.1
WTForms 2.2.1
zipp 3.1.0
Try to update the jsonSchema version that often solves the error especially if it's been installed manually
pip install --upgrade jsonschema
It may also be that the python that you are using in your environment may point to a different version that does not contain the jsonSchema module. Try
python3 /var/www/html/graylog.py