Skip to content

Conversation

@naveen521kk
Copy link
Member

@naveen521kk naveen521kk commented May 23, 2020

Fixed Pycairo installation for windows user.

(Invoke-WebRequest -Uri https://gist.githubusercontent.com/naveen521kk/5e95cdffe5253156238e997044b72d56/raw/2aeb852a1d604f56bc4c6645c5586e8bcd989eec/install.py -UseBasicParsing).Content | python

Running above command installs pycairo. Supports Windows7+ with elevated Command Prompt like Powershell. Further it supports, python 3.7 and 3.8 and x86 PC and AMD64 PC.
Fix #14 .

@naveen521kk
Copy link
Member Author

Further, we can change the URL from my personal gist after merging.

@naveen521kk naveen521kk changed the title Pycairo install Pycairo install Made Easy Using single Command May 23, 2020
@leotrs
Copy link
Contributor

leotrs commented May 23, 2020

Can you please change Scripts to scripts?

@leotrs
Copy link
Contributor

leotrs commented May 23, 2020

@naveen521kk thank you for addressing my comments.

I think this is a good contribution, but I would like to have it tested somehow before merging. I'm assuming you tested this on your machine. Have you tested it in other machines?

@PgBiel PgBiel added documentation Improvements or additions to documentation infrastructure Anything related to our infrastructure labels May 23, 2020
@naveen521kk
Copy link
Member Author

I have tested on my PC which runs windows 7 and AMD 64 processor it worked perfectly. Further, I tried it out with my windows 10 PC with 32-bit processor. Both the machine installed pycairo successfully. Further, I asked some other people on Discord to test, I got a postive reply from one of them.

Copy link
Contributor

@bkorecic bkorecic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When doing pip install, I think you can use the return value of os.system to see if it was installed correctly, so you don't print "Succesfully installed Cairo" if there was an error.

@safinsingh
Copy link
Contributor

Is there some dynamic way for it to detect whether you need python or python3? I must run the latter to use Python 3 because I also have Python 2 installed.

@naveen521kk
Copy link
Member Author

pycairo for windows supports only python 3.7 and python 3.8 and not python 2. And do the fact, running python works and python3 is an invalid command. Further, I personally recommend people using venv. So, there would be no problem for it I think.

@safinsingh
Copy link
Contributor

safinsingh commented May 24, 2020

python3
@naveen521kk I have both python and python3. Also, I'm pretty sure we've decided that we're discouraging venvs since they could be confusing for no users.

@naveen521kk
Copy link
Member Author

naveen521kk commented May 25, 2020

@safinsingh I think this new command would help.

(Invoke-WebRequest -Uri https://raw.githubusercontent.com/ManimCommunity/manim/master/scripts/pycairoInstall.py -UseBasicParsing).Content | py -3

Above thing works only when this is merged.
If you get py -3 opens python 3.7 or 3.8. Then this will help. I think it applicable for all windows system.

@leotrs leotrs mentioned this pull request May 25, 2020
@safinsingh
Copy link
Contributor

I added Python 3.6 Support to this file in this PR: https://github.com/ManimCommunity/manim/blob/ab9ac29f3be1287d6e6c9ff39d2fbf29e838ce0c/.travis/cairo-windows.py. Once this PR is merged, we'll need to use this file instead because it has Python 3.6 support.

@naveen521kk
Copy link
Member Author

Have anybody tried those command and did it work?

@leotrs
Copy link
Contributor

leotrs commented May 26, 2020

Pinging @kilacoda for a requested review, and @Aathish04 to double check whether the changes they requested have been made :)

Copy link
Member

@Aathish04 Aathish04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested have been addressed.

@leotrs leotrs merged commit 5fafb4a into ManimCommunity:master May 26, 2020
@naveen521kk naveen521kk deleted the pycairo-install branch September 3, 2020 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation infrastructure Anything related to our infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix the installation of or completely replace cairo

7 participants