Skip to content
This repository was archived by the owner on Nov 3, 2023. It is now read-only.

Rework Installation Instructions #5015

Merged

Conversation

Bengt
Copy link
Contributor

@Bengt Bengt commented Apr 18, 2023

Patch description

  • Add some structure to clearly distinguish texts regarding the operating system, Python interpreter, and virtual environment
  • Reformat end user and developer installation headings to use ATX-style headers for cleaner use of markdown
  • Extend instructions to use a virtual environment as recommended in the text

Testing steps

  • Run the instructions on a supported operating system and observe that they work flawlessly as-is.

Other information

These fixes are largely stylistic, but the instructions are now more complete and actually work.

- Add some structure to the texts regarding the operating system, Python interpreter, and virtual environment
- Reformat end user and developer installation headings to use markdown ATX-style headers
- Extend instructions to use a virtual environment like recommended in the text
Copy link
Contributor

@klshuster klshuster left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! Left a few small comments

Comment on lines +83 to +86
cd /path/to/your/parlai-app
python3.8 -m venv venv
venv/bin/pip install --upgrade pip setuptools wheel
venv/bin/pip install parlai
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks unnecessarily complex when all we are asking is for a pip install

Copy link
Contributor Author

@Bengt Bengt Apr 18, 2023

Choose a reason for hiding this comment

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

Since the virtual environment never gets activated (e.g. source venv/bin/activate in Bash), pip install would call the system pip (e.g. /usr/bin/pipunder Ubuntu). The readme specifically recommends using the virtual environment, so I specify using the executables installed into it by addressing them with their full path. Note that this works in any shell on any unixoid operating system. In particular, these instructions are portable between at least many shells. Using relative paths seems more compact to me than to list commands for every supported shell, like bash, csh and fish.

Comment on lines +97 to +100
cd ~/ParlAI
python3.8 -m venv venv
venv/bin/pip install --upgrade pip setuptools wheel
venv/bin/python setup.py develop
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto here; does this fail if you do not specify venv/bin/python?

Copy link
Contributor Author

@Bengt Bengt Apr 18, 2023

Choose a reason for hiding this comment

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

Again, python is the system Python interpreter, because the venv was never activated, which I suppose is the more portable option. Consider that users of the readme are usually copying these commands, so there is a tradeoff to be made between the legibility of single commands and readability of overall the instruction document. I mean, if there were options listed for many shells, users could easily get confused. This portable version should work for all the supported shells and is still obvious enough, I feel.

@Bengt
Copy link
Contributor Author

Bengt commented Apr 18, 2023

@klshuster Thanks for having a look at this. I would be glad to contribute. I was in need of better installation instructions, and I hope I can help the next person in my position.

@klshuster
Copy link
Contributor

Could you please rebase onto the main branch? then I think we can go ahead and merge this

@github-actions
Copy link

github-actions bot commented Jun 3, 2023

This PR has not had activity in 30 days. Closing due to staleness.

@github-actions github-actions bot added the stale label Jun 3, 2023
@klshuster klshuster merged commit 86ec735 into facebookresearch:main Jun 5, 2023
@Bengt Bengt deleted the Rework-Installation-Instructions branch June 6, 2023 11:49
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants