0

I have made a project folder here: Desktop/xetra_project

I installed python 3.11 and would like to use pipenv to create a virtual environment with python 3.11 for this project.

When I try to create a virtual environment with python 3.11 in this project folder, I end up outside of this project folder and within other virtual environments. As a result, I am left with python 3.10.6. Is there someone who may know what I am doing wrong? Here are my terminal commands and responses:

➜ xetra_project pipenv shell --python /usr/local/bin/python3.11

Launching subshell in virtual environment... . /Users/hanna/.venv/bin/activate /Users/hanna/.zshrc:208: command not found: libpq /Users/hanna/.zshrc:unset:222: LDFLAGS=-L/opt/homebrew/opt/libpq/lib: invalid parameter name (base) ➜ ~ . /Users/hanna/.venv/bin/activate

(.venv) (base) ➜ ~ python -V

Python 3.10.6

I have a lot of python versions installed on my computer. See attached picture.

so many pythons

Hanna
  • 93
  • 1
  • 6
  • Do you have multiple Python versions installed? If so, please explain in your post. – Ben the Coder Jan 27 '23 at 01:54
  • You could try `py -3.11 -m venv venv` – Fractalism Jan 27 '23 at 01:54
  • @BentheCoder Yes, I just added a picture of all the Python versions I have installed – Hanna Jan 27 '23 at 02:22
  • if you are open to create env with `venv` you can refer [virtual env with venv](https://stackoverflow.com/questions/75129920/how-to-config-python-virtual-environment-with-a-specific-python-version/75130194#75130194). so `cd /usr/local/bin/python3.11` and then `python3.11 -m venv venv` – simpleApp Jan 27 '23 at 02:28
  • one debug you can do, once you activate the env, if you type `which python`, then python should be picked from the virtual env which was created. – simpleApp Jan 27 '23 at 02:35
  • "which python" returns /usr/local/bin/python and "which python3" returns /opt/homebrew/bin/python3. How can I use this information to solve the problem? – Hanna Jan 27 '23 at 02:39

0 Answers0