Open marcelo321 opened 1 year ago
I've been having the same problem, but everything was working just fine 4 days ago.
I noticed that the latest version of virtualenv is now 20.20.0
, last week it was 20.19.0
.
virtualenv 20.20.0
adds the packages: pip==23.0.1, setuptools==67.4.0, wheel==0.38.4
virtualenv 20.19.0
adds the packages: pip==23.0, setuptools==67.1.0, wheel==0.38.4
Platform: Ubuntu 20.04.5 LTS
got same error and solved it by doing below: /home/your user name/.ebcli-virtual-env/bin/python -m pip install --upgrade pip
Installing the previous virtualenv
version did the trick. You can do that by using
pipx install git+https://github.com/pypa/virtualenv.git#e2833afe407ea8a9b8abd79befd4339f7c1c873b
Instead of
pipx install virtualenv
I managed to installed it with your suggestion, but now having this error.
@mateus-batista Any idea how to properly solve the print error?
# eb
Error processing line 1 of /root/.ebcli-virtual-env/lib/python3.10/site-packages/distutils-precedence.pth:
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 158, in addpackage
exec line
File "<string>", line 1, in <module>
File "/root/.ebcli-virtual-env/lib/python3.10/site-packages/_distutils_hack/__init__.py", line 194
f'spec_for_{name}',
^
SyntaxError: invalid syntax
Remainder of file ignored
usage: eb (sub-commands ...) [options ...] {arguments ...}
Welcome to the Elastic Beanstalk Command Line Interface (EB CLI).
For more information on a specific command, type "eb {cmd} --help".
commands:
abort Cancels an environment update or deployment.
appversion Listing and managing application versions
clone Clones an environment.
I believe it might be because it is using python 2.7? File "/usr/lib/python2.7/site.py", line 158, in addpackage
, how do i force it to use python3?
I believe it might be because it is using python 2.7?
File "/usr/lib/python2.7/site.py", line 158, in addpackage
, how do i force it to use python3?
You may be missing some dependency libraries. Check this session of the readme file: https://github.com/aws/aws-elastic-beanstalk-cli-setup#4-troubleshooting
@mateus-batista here is the output:
# apt-get install build-essential zlib1g-dev libssl-dev libncurses-dev libffi-dev libsqlite3-dev libreadline-dev libbz2-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
build-essential is already the newest version (12.9ubuntu3).
libbz2-dev is already the newest version (1.0.8-5build1).
libffi-dev is already the newest version (3.4.2-4).
libncurses-dev is already the newest version (6.3-2).
libreadline-dev is already the newest version (8.1.2-1).
libsqlite3-dev is already the newest version (3.37.2-2ubuntu0.1).
libssl-dev is already the newest version (3.0.2-0ubuntu1.8).
zlib1g-dev is already the newest version (1:1.2.11.dfsg-2ubuntu9.2).
The following packages were automatically installed and are no longer required:
accountsservice crda glib-networking glib-networking-common glib-networking-services kpartx language-selector-common libaccountsservice0 libcanberra0 libfuse2
libfwupdplugin1 libntfs-3g883 libogg0 libproxy1v5 libpython3.8 libpython3.8-dev libpython3.8-minimal libpython3.8-stdlib libsgutils2-2 libsoup2.4-1 libsoup2.4-common
libtdb1 libvorbis0a libvorbisfile3 libwebp6 libxmlb1 ltrace php-common python-pkg-resources python-setuptools python3-debian python3.8 python3.8-dev python3.8-minimal
ruby2.7 ruby2.7-dev ruby2.7-doc sg3-utils sg3-utils-udev sound-theme-freedesktop
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.
# eb
Error processing line 1 of /root/.ebcli-virtual-env/lib/python3.10/site-packages/distutils-precedence.pth:
Traceback (most recent call last):
File "/usr/lib/python2.7/site.py", line 158, in addpackage
exec line
File "<string>", line 1, in <module>
File "/root/.ebcli-virtual-env/lib/python3.10/site-packages/_distutils_hack/__init__.py", line 194
f'spec_for_{name}',
^
SyntaxError: invalid syntax
Remainder of file ignored
usage: eb (sub-commands ...) [options ...] {arguments ...}
Welcome to the Elastic Beanstalk Command Line Interface (EB CLI).
For more information on a specific command, type "eb {cmd} --help".
commands:
abort Cancels an environment update or deployment.
appversion Listing and managing application versions
clone Clones an environment.
codesource Configures the code source for the EB CLI to use by default.
config Modify an environment's configuration. Use subcommands to man
the weird thing is eb runs partially, always the error first and then part of the eb
output.
the suggestions in https://bbs.archlinux.org/viewtopic.php?id=276388 did not help neither pip uninstall setuptools
After spending hours trying to get this to work I just used pipx as mentioned here and all installed fine: https://github.com/aws/aws-elastic-beanstalk-cli-setup/issues/149
Also finding this error everywhere which is caused by wrong usage of print in python:
Shouldn't be
print(json.dumps(resource, indent=4))
instead?