The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Use pyenv For Virtual Environments

TODO: Pull subtitle into page object

NOTE: Not really using this since it requires setting up something in the shell that slows down the return of the command line each time

using the built in `venv` instead. from python3 that was installed by homebrew

OLD Notes:

Got notes from this article, it's basically how you did the setup.

https://medium.com/swlh/a-guide-to-python-virtual-environments-8af34aa106ac

Script to create new project they have is:

mkdir $2 && cd $2 && pyenv local $1 && pyenv virtualenv venv-$2 && pyenv local venv-$2 && pyenv activate venv-$2

Where you pass a python version and a name to create the directory and project, of course, that doesn't deal with git

The manual way to do it is

cd ~/git-repos git init --bare project_name cd ~/dev git clone ~/git-dev/project_name cd project_name # add .gitignore # add README.md pyenv virtualenv 3.9.4 venv_project_name pyenv local venv_project_name

For PyCharm, just open the new directory, don't make a new project.

Note sure if you need that first local since you're setting it to the venv later.

Note, this is what's in the article, but I it look like you don't need the `pyenv local 3.9.0` or `pyenv activate venv_project_name` commands so you removed them above.

mkdir project_name cd project_name pyenv local 3.9.0 pyenv virtualenv 3.9.0 venv_project_name pyenv local venv_project_name pyenv activate venv_project_name

tagging this with `pyvenv` in case you accidentally search for that.

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

Use pyenv For Virtual Environments

-- p

NOTE: Not really using this since it requires setting up something in the shell that slows down the return of the command line each time

-- p

using the built in `venv` instead. from python3 that was installed by homebrew

-- p

OLD Notes:

-- p

Got notes from this article, it's basically how you did the setup.

-- p

https://medium.com/swlh/a-guide-to-python-virtual-environments-8af34aa106ac

-- p

Script to create new project they have is:

-- p

mkdir $2 && cd $2 && pyenv local $1 && pyenv virtualenv venv-$2 && pyenv local venv-$2 && pyenv activate venv-$2

-- p

Where you pass a python version and a name to create the directory and project, of course, that doesn't deal with git

-- p

The manual way to do it is

-- p

cd ~/git-repos
    git init --bare project_name
    cd ~/dev 
    git clone ~/git-dev/project_name
    cd project_name
    # add .gitignore
    # add README.md
    pyenv virtualenv 3.9.4 venv_project_name
    pyenv local venv_project_name

-- p

For PyCharm, just open the new directory, don't make a new project.

-- p

Note sure if you need that first local since you're setting it to the venv later.

-- p

Note, this is what's in the article, but I it look like you don't need the `pyenv local 3.9.0` or `pyenv activate venv_project_name` commands so you removed them above.

-- p

mkdir project_name
    cd project_name
    pyenv local 3.9.0
    pyenv virtualenv 3.9.0 venv_project_name
    pyenv local venv_project_name
    pyenv activate venv_project_name

-- p

tagging this with `pyvenv` in case you accidentally search for that.


-- categories
-- Miscellaneous

-- metadata
-- date: 2021-11-03 21:44:46
-- id: 20eoeijm
-- status: scratch
-- type: post
-- SCRUBBED_NEO: false
-- site: aws