Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cheat.sh standalone mode + Python3 #157

Closed
iomari opened this issue Sep 6, 2019 · 5 comments
Closed

cheat.sh standalone mode + Python3 #157

iomari opened this issue Sep 6, 2019 · 5 comments

Comments

@iomari
Copy link

@iomari iomari commented Sep 6, 2019

Greetings,

What are the steps to use python 3 in standalone mode?
I've successfully converted to standalone mode using cht.sh --standalone-install
but it's using python 2.
Already pip is warning about using python 2.

iomari

@chubin chubin changed the title Python3 Cheat.sh standalone mode + Python3 Sep 6, 2019
@chubin chubin changed the title Cheat.sh standalone mode + Python3 cheat.sh standalone mode + Python3 Sep 6, 2019
@chubin

This comment has been minimized.

Copy link
Owner

@chubin chubin commented Sep 6, 2019

@iomari

cheat.sh itself supports both Python 2 and Python 3.
By default, cht.sh standalone installer uses Python 2.
That is how you can switch it to Python 3:

At the line 182 of cht.sh you have the following code:

  182   _say_what_i_do Creating virtual environment
  183   python2 "$(command -v virtualenv)" ve \
  184       || fatal Could not create virtual environment with "python2 $(command -v virtualenv) ve"

Replace here python2 with python3, and rerun the script.

@iomari

This comment has been minimized.

Copy link
Author

@iomari iomari commented Sep 6, 2019

I did that but the screen output shows python2 references only.
Especially in reference to the virtual environment.

@chubin

This comment has been minimized.

Copy link
Owner

@chubin chubin commented Sep 6, 2019

@iomari Please add -p python3 to the command line:

python3 "$(command -v virtualenv)" -p python3 ve
@iomari

This comment has been minimized.

Copy link
Author

@iomari iomari commented Sep 6, 2019

@iomari iomari closed this Sep 6, 2019
@iomari

This comment has been minimized.

Copy link
Author

@iomari iomari commented Sep 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.