Komodo / KomodoEdit

Komodo Edit is a fast and free multi-language code editor. Written in JS, Python, C++ and based on the Mozilla platform.
http://www.komodoide.com/komodo-edit
Other
2.16k stars 303 forks source link

Verify virtualenv installation and configuration steps in tutorials #2566

Open davetlewis-alida opened 7 years ago

davetlewis-alida commented 7 years ago

Short Summary

The setup tutorials in the Toolbox for Catalyst, Django, Flask, and Pyramid share instructions for installing and configuring virtualenv. I've tried going through the tutorials several times with different Python versions (ActiveState and non-ActiveState) and I've run into problems with the virtualenv setup more often than not. I've also tried the tutorials on macOS, Linux, and Windows.

Steps to Reproduce

Follow the steps in the tutorial.

Expected results

The tutorial should be straightforward to work through. I'm not sure if it's a matter of adding some additional troubleshooting information to the tutorial, or if there's a more reliable way of getting virtualenv up and running.

Actual results

Platform Information

Komodo Edit or IDE? - Komodo IDE Komodo Version? - Multiple Komodo 10+ releases.
Operating System (and version)? macOS Sierra, Ubuntu Linux 16, Windows 10

Additional Information

th3coop commented 7 years ago

I'm not sure what the action item is here? What exactly fails? If there are suggestions of what to change to make it more straight forward please provide them.

Naatan commented 7 years ago

Please follow the fields as described. The explanation here is akin to saying "it doesn't work", which doesn't tell us much.

th3coop commented 7 years ago

@Naatan, I should have updated this. This ticket was filed by Davel on request from @mjainQA to follow up on later I believe. Basically, this ticket isn't for us (the devs).

davetlewis-alida commented 7 years ago

For clarity I think we should change pip install virtualenv and virtualenv VENV in the python tutorials to:

python -m pip install virtualenv / python3 -m pip install virtualenv python -m virtualenv VENV / python3 -m virtualenv VENV

I don't think virtualenv VENV works on macOS with ActivePython, and while specifying longer command involves more typing, it ensures that the user is pointing to the right package for the version they're running or hopefully a clear error.

Discussed briefly here: https://twitter.com/dabeaz/status/922859605247643649

Naatan commented 7 years ago

Frankly this is a bug with ActivePython. It should expose virtualenv rather than rely on tools to work around it. While python -m modulename is a known workaround for such issues it is not the common workflow.

I guess whether it is best practice is another discussion. Personally I think these issues should be solved at their point of origin rather than falling back on the user to work around them.