-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Add instructions how to activate virtual env under windows with pip #29113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 5 commits
8dcb6f9
d94c5a1
7aaf270
39f6fa7
e1d3a6d
776e542
dc93e56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -238,12 +238,15 @@ Creating a Python environment (pip) | |
If you aren't using conda for your development environment, follow these instructions. | ||
You'll need to have at least python3.5 installed on your system. | ||
|
||
.. code-block:: none | ||
**Unix**/**Mac OS** | ||
|
||
.. code-block:: bash | ||
|
||
# Create a virtual environment | ||
# Use an ENV_DIR of your choice. We'll use ~/virtualenvs/pandas-dev | ||
# Any parent directories should already exist | ||
python3 -m venv ~/virtualenvs/pandas-dev | ||
|
||
# Activate the virtualenv | ||
. ~/virtualenvs/pandas-dev/bin/activate | ||
|
||
|
@@ -254,6 +257,34 @@ You'll need to have at least python3.5 installed on your system. | |
python setup.py build_ext --inplace -j 4 | ||
python -m pip install -e . --no-build-isolation | ||
|
||
**Windows** | ||
|
||
Below is a brief overview on how to set-up a virtual environment with Powershell | ||
under Windows. For details please refer to the | ||
`official virtualenv user guide <https://virtualenv.pypa.io/en/stable/userguide/#activate-script>`__ | ||
|
||
.. code-block:: powershell | ||
|
||
# Create a virtual environment | ||
# Use an ENV_DIR of your choice. We'll use ~\virtualenvs\pandas-dev where | ||
# '~' is the folder pointed to by either $env:USERPROFILE (Powershell) or | ||
# %USERPROFILE% (cmd.exe) environment variable | ||
# Any parent directories should already exist | ||
|
||
# If you are using cmd.exe, run instead: python -m venv $env:USERPROFILE\virtualenvs\pandas-dev | ||
python -m venv $env:USERPROFILE\virtualenvs\pandas-dev | ||
|
||
# Activate the virtualenv | ||
# If you are using cmd.exe, run instead: %USERPROFILE%\virtualenvs\pandas-dev\Scripts\activate.bat | ||
~\virtualenvs\pandas-dev\Scripts\Activate.ps1 | ||
gbaychev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Install the build dependencies | ||
python -m pip install -r requirements-dev.txt | ||
|
||
# Build and install pandas | ||
python setup.py build_ext --inplace -j 4 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not sure why we had There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got confused, it's |
||
python -m pip install -e . --no-build-isolation --no-use-pep517 | ||
|
||
Creating a branch | ||
----------------- | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd move this outside of the code block, it'll be easier to read as a paragraph than as code comments.
Also, since you explain the equivalence of
$env:USERPROFILE
and%USERPROFILE%
here, you can just leave one of them below. Will look much cleaner and clearer without duplicating the ocmmands.Other than that, lgtm