# Creating PsychoPy virtualenv

**URL:** <https://discourse.psychopy.org/t/creating-psychopy-virtualenv/4537>\
**Category:** Coding\
**Created:** [May 19, 2018, 3:09am UTC](https://discourse.psychopy.org/t/creating-psychopy-virtualenv/4537 "2018-05-19T03:09:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stiltstiltstilts](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Stiltstiltstilts](https://discourse.psychopy.org/u/Stiltstiltstilts)\
**Post date:** [May 19, 2018, 3:09am UTC](https://discourse.psychopy.org/t/creating-psychopy-virtualenv/4537/1 "2018-05-19T03:09:53Z")

</div>

Hi all,

Trying to get some sort of PsychoPy virtual environment setup that I can use on my computer and with a more feature-rich editor like Visual Studio Code.

I setup a virtual environment (using venv) with Python3.6.5 and then tried installing PsychoPy in this environment by either pip install psychopy or downloading PsychoPy-1.90.2 directly and just running a pip install -e . on that.

Can’t seem to get it to work, and always get this error

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/e/f/ef03b3df688ca812fec6f3ce58709bb94bf2de7a.png)

What am I doing wrong here? (alternatively, anyone know how to get VSC to use the python environment that the PsychoPy editor uses?

Thanks in advance

---

<div class="post-metadata">

**Author:** ![djmannion](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/djmannion/32/37535_2.png) [@djmannion](https://discourse.psychopy.org/u/djmannion)\
**Post date:** [May 19, 2018, 4:24am UTC](https://discourse.psychopy.org/t/creating-psychopy-virtualenv/4537/2 "2018-05-19T04:24:39Z")

</div>

I don’t know Macs very well, but it looks like [a problem with xcode](https://apple.stackexchange.com/questions/254380/macos-sierra-invalid-active-developer-path).

---

<div class="post-metadata">

**Author:** ![Stiltstiltstilts](https://avatars.discourse-cdn.com/v4/letter/s/94ad74/32.png) [@Stiltstiltstilts](https://discourse.psychopy.org/u/Stiltstiltstilts)\
**Post date:** [May 19, 2018, 11:40am UTC](https://discourse.psychopy.org/t/creating-psychopy-virtualenv/4537/3 "2018-05-19T11:40:25Z")

</div>

Thank you!

That worked a charm. I had to install xcode dev tools first.
