r/Python • • Apr 30 '18

xkcd: Python Environment

Post image
2.4k Upvotes

388 comments sorted by

View all comments

Show parent comments

1

u/TBSchemer May 01 '18

See my list of issues above.

0

u/meandertothehorizon It works on my machine May 01 '18

Sorry, the tools are there, I’m impressed at your ability to over complicate this. You come bitching, and snarky - so.. enjoy your misery? Not sure what you want here.

1

u/TBSchemer May 01 '18

You literally haven't even addressed my use case.

1

u/meandertothehorizon It works on my machine May 02 '18
C:\>mkdir %USERPROFILE%\bin

C:\>set PATH=%PATH%;%USERPROFILE%\bin

C:\>mkdir %USERPROFILE%\venv

C:\>C:\Python27\Scripts\pip.exe install virtualenv
Collecting virtualenv
  Downloading https://files.pythonhosted.org/packages/ed/ea/e20b5cbebf45d3096e8138ab74eda139595d827677f38e9dd543e6015bdf/virtualenv-15.2.0-py2.py3-none-any.whl (2.6MB)
    100% |################################| 2.6MB 261kB/s
Installing collected packages: virtualenv
Successfully installed virtualenv-15.2.0

C:\>C:\Python27\Scripts\virtualenv.exe %USERPROFILE%\venv\py27venv
New python executable in C:\Users\meandertothehorizon\venv\py27venv\Scripts\python.exe
Installing setuptools, pip, wheel...done.

C:\>C:\Python34\python.exe -m venv %USERPROFILE%\venv\py34venv

C:\>C:\Python35\python.exe -m venv %USERPROFILE%\venv\py35venv

C:\>C:\Python36\python.exe -m venv %USERPROFILE%\venv\py36venv

C:\>for %x in (27, 34, 35, 36) do echo #!%USERPROFILE%\venv\py%xvenv\Scripts\python.exe > %USERPROFILE%\bin\py%x-test-script.py

C:\>echo #!C:\Users\meandertothehorizon\venv\py27venv\Scripts\python.exe  1>C:\Users\meandertothehorizon\bin\py27-test-script.py

C:\>echo #!C:\Users\meandertothehorizon\venv\py34venv\Scripts\python.exe  1>C:\Users\meandertothehorizon\bin\py34-test-script.py

C:\>echo #!C:\Users\meandertothehorizon\venv\py35venv\Scripts\python.exe  1>C:\Users\meandertothehorizon\bin\py35-test-script.py

C:\>echo #!C:\Users\meandertothehorizon\venv\py36venv\Scripts\python.exe  1>C:\Users\meandertothehorizon\bin\py36-test-script.py

C:\>for %x in (27, 34, 35, 36) do echo import sys; print(sys.version) >> %USERPROFILE%\bin\py%x-test-script.py

C:\>echo import sys; print(sys.version)  1>>C:\Users\meandertothehorizon\bin\py27-test-script.py

C:\>echo import sys; print(sys.version)  1>>C:\Users\meandertothehorizon\bin\py34-test-script.py

C:\>echo import sys; print(sys.version)  1>>C:\Users\meandertothehorizon\bin\py35-test-script.py

C:\>echo import sys; print(sys.version)  1>>C:\Users\meandertothehorizon\bin\py36-test-script.py

C:\>for %x in (27, 34, 35, 36) do py%x-test-script

C:\>py27-test-script
2.7.15 (v2.7.15:ca079a3ea3, Apr 30 2018, 16:22:17) [MSC v.1500 32 bit (Intel)]

C:\>py34-test-script
3.4.4 (v3.4.4:737efcadf5a6, Dec 20 2015, 19:28:18) [MSC v.1600 32 bit (Intel)]

C:\>py35-test-script
3.5.4 (v3.5.4:3f56838, Aug  8 2017, 02:07:06) [MSC v.1900 32 bit (Intel)]

C:\>py36-test-script
3.6.5 (v3.6.5:f59c0932b4, Mar 28 2018, 16:07:46) [MSC v.1900 32 bit (Intel)]

You will notice I did not use virtualenvwrapper-win because you should not be using it. You obviously do not understand how things are working here (which I will say is normal, not everyone can be an expert at everything) and yet at the same time you seem to want to maintain some sense of superiority by disregarding the advice of people who know more than you. The fact that you could not get the above working for weeks tells me that you are not willing to simply RTFM and gain an understanding of the tools you use.

→ More replies (2)