Closed tsmcgrath closed 2 weeks ago
same here
Today, I get a different error. I don't believe changes were made - but I have been trying to solve my environment issues and might have changed something by installing mini conda.
pipenv install
Creating a virtualenv for this project...
Pipfile: /Users/tim/DocumentsLocal/Github/catch23/Pipfile
Using /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 (3.11.4) to create virtualenv...
⠹ Creating virtual environment...RuntimeError: failed to query /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 with code 1 err: 'Traceback (most recent call last):\n File "/Users/tim/Library/Python/3.9/lib/python/site-packages/virtualenv/discovery/py_info.py", line 9, in
✘ Failed creating virtual environment [pipenv.exceptions.VirtualenvCreationException]: Failed to create virtual environment.
Still getting this error:
tim@Timothys-MacBook-Pro catch23 % pipenv install
Creating a virtualenv for this project...
Pipfile: /Users/tim/DocumentsLocal/Github/catch23/Pipfile
Using /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 (3.11.4) to create virtualenv...
⠸ Creating virtual environment...RuntimeError: failed to query /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 with code 1 err: 'Traceback (most recent call last):\n File "/Users/tim/Library/Python/3.9/lib/python/site-packages/virtualenv/discovery/py_info.py", line 9, in
✘ Failed creating virtual environment [pipenv.exceptions.VirtualenvCreationException]: Failed to create virtual environment.
Have you tried uninstalling and re-isntalling virtualenv
? Is this still an issue?
We have a fleet of M1 mac in my company and we do not have this error. The path of the python3 binary (/Library/Frameworks/Python.framework/Versions/3.11/bin/python3
) makes me think that OP used a system, macos-provided python, and they often come with truckload of problems since they have been (often heavily) modified.
It is still an issue. See attached. @deronnax I'm not disagreeing that it's an issue with my environment. How do I fix it? pipenv_installtest1.txt @matteius It's still a problem. After uninstall and reinstall (both venv and pipenv successful): pipenv_installtest2.txt
@tsmcgrath Possibly the PYTHONHOME and PYTHONPATH environment variables are pointing to different python versions? "Make sure you do not have any mismatch between Python interpreter version used (like 3.7) and the 're' python module (like 3.6.1)."
This is coming from: https://stackoverflow.com/questions/53600426/whats-does-assert-sre-magic-magic-sre-module-mismatch-assertionerror-sre-m
@tsmcgrath use pyenv to get you a working, correct, vanilla python. This has become the industry standard https://github.com/pyenv/pyenv
EDIT: Ah, it looks like you are using a custom python distribution (something like conda), so you probably won't want to add another python distribution like pyenv. The error you are having is probably because you are mixing two python of different origin (e.g, the python of your system is probably called on the re stdlib module of your conda python, or vice-versa). Uninstalling and reinstalling your Conda python should fix this, unless there has been real crap made.
Thanks for the assist @matteius and @deronnax. I'll try those suggestions in a day or so as I'm about to travel.
Sounds good @tsmcgrath fwiw, I tried on my Mac M1 yesterday and it was still working. I do have pyenv, but I want to say by default it may resolve a system python, but I'd have to check again to be sure.
Has this been solved? I have same problem on MacOS M1 and I can't figure out why - I've removed all python versions from brew, used pyenv, but still same problems:
❯ python -m virtualenv venv
RuntimeError: No implementation for PythonInfo(spec=CPython3.11.9.final.0-64, exe=/Users/xxxx/.pyenv/versions/3.11.9/bin/python, platform=darwin, version='3.11.9 (main, Aug 20 2024, 09:28:21) [Clang 15.0.0 (clang-1500.3.9.4)]', encoding_fs_io=utf-8-utf-8)
Help, please...
Update - my problem is solved - it turned out I had a environment variable VIRTUALENV_SEEDER
set to azdo-pip
- seems like some leftover from setting up Azure Artifacts that I didn't clean up properly... 🙈
Sorry, I forgot about this ticket. My issues were resolved by cleaning up the environment and removing older versions of Python. I'll leave the issue open since @miqm looks to need some help. But from my point of view it can be closed. Thanks for the assist.
From my side it can also be closed, problem solved by removing some junk env...
I'm getting this error on a Mac M1 with a fresh install of python 3.11.4. % pipenv install Creating a virtualenv for this project... Pipfile: /Users/tim/DocumentsLocal/Github/catchtest1/Pipfile Using /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 (3.11.4) to create virtualenv... ⠙ Creating virtual environment...AttributeError: 'dict' object has no attribute 'select'
✘ Failed creating virtual environment [pipenv.exceptions.VirtualenvCreationException]: Failed to create virtual environment.
Was here: https://github.com/conda/conda/issues/10293