SharePoint / sp-dev-docs

SharePoint & Viva Connections Developer Documentation
https://docs.microsoft.com/en-us/sharepoint/dev/
Creative Commons Attribution 4.0 International
1.24k stars 1.01k forks source link

You need Python2.7 installed and added to Path env variable before start to do anything. #3861

Closed rodriguinIT closed 5 years ago

rodriguinIT commented 5 years ago

This is a message to help IT guys like me. I don't know if you miss it or you took for granted that all dev guys have python installed.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

msft-github-bot commented 5 years ago

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

patmill commented 5 years ago

You shouldn't have needed python installed for quite a while now (1+ years). Where are you hitting this requirements? What OS/SPFx version are you using?

rodriguinIT commented 5 years ago

My intention was create a development VM. SO I installed a fresh copy of Windows 10 Enterprise 1809 x64 in a VM - Then I installed Office Pro (from Office 365 portal) and Sharepoint designer. After that I started to follow this instruction. First attemp with Node 8.16.0 x64 - Install @microsoft/generator-sharepoint drops me a lot of error trying to install several components (also some rare error like that it can't install some dependencies because it can't download some packages - so I test the url and the download works fine - also I don't have proxy or nothing at all) - when I tried to create helloworld-webpart the first attemp yeoman hangs - then finished but with a lot of errors and gulp serve drops Error: Cannot find module '@microsoft/sp-build-web' - so I downgrade to node version that was used in the video linked in this page and the same behavior. Reading github issue tracker i've found a stackoverflow link that show me differents forms to solve the issue https://stackoverflow.com/questions/15126050/running-python-on-windows-for-node-js-dependencies so I've rollback to previous checkpoint and start it again but now I installed Python2.7 and set up the correct path env var (and also i've added some npm property that points to python binary but i'm not sure if it really needed) and voila. I have my workbench with my first webpart.

andrewconnell commented 5 years ago

It sounds like dependencies aren't being installed correctly. As @patmill said, installing python hasn't been a required step for quite some time. I recently built a brand new Win10 VM and didn't have this experience.

Could all those errors be because you are behind a proxy on your corp network? That would cause it... If so, there are configuration changes you can make to NPM to let it know the proxy server details...

msft-github-bot commented 5 years ago

This issue has been automatically marked as stale because it has marked as requiring author feedback but has not had any activity for 7 days. It will be closed if no further activity occurs within next 7 days of this comment. Thank you for your contributions to SharePoint Developer activities.

StfBauer commented 5 years ago

It depends on some situation you run for what reason ever NodeJS on Windows only in 32bit mode. Since there are no precompiled versions are available for Windows 32bit you have to compile them yourself using:

npm install -g windows-build-tools

The check if NodeJS is running on 32bit or 64bit can be done with.

node -p "process.arch"
Screenshot 2019-06-27 at 20 04 39
rodriguinIT commented 5 years ago

As I said, my deployment was a fresh Windows 10 Install

It sounds like dependencies aren't being installed correctly. As @patmill said, installing python hasn't been a required step for quite some time. I recently built a brand new Win10 VM and didn't have this experience. Could all those errors be because you are behind a proxy on your corp network? That would cause it... If so, there are configuration changes you can make to NPM to let it know the proxy server details...

Sorry but no, it was my home network. no firewall or UTM at all. My vms have full Internet Access. But it's ok I found a solution and maybe it will help someone with my issue.

rodriguinIT commented 5 years ago

It depends on some situation you run for what reason ever NodeJS on Windows only in 32bit mode. Since there are no precompiled versions are available for Windows 32bit you have to compile them yourself using: npm install -g windows-build-tools The check if NodeJS is running on 32bit or 64bit can be done with. node -p "process.arch"

ia32 -32bit NodeJS x64 - 64bit NodeJS

Maybe this is the issue. I always use x64 in my VMs. Also I don't remember my exact procedure but I remember playing around with Architecture versions and NodeJS.

andrewconnell commented 5 years ago

Seems like this is localized to your environment @rodriguinIT as you say you were playing around with arch versions & node.js... so we're good?

rodriguinIT commented 5 years ago

Yes sir! We're good!! thanks!

msft-github-bot commented 4 years ago

Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues