I'm not a python developer and I have wanted to try some LlAMA llm, but I think I have messed up PIP. I'm on Macos, installed python 3.11, but when I do python3.11 -m pip install numpy, I get this error:
ERROR: Exception:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 853, in move
os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/private/var/folders/_f/zg7ly97n4kl58rn_vnfddfhw0000gn/T/pip-target-ii00g2i_/lib/python/numpy-1.26.4.dist-info' -> '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy-1.26.4.dist-info'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
status = run_func(*args)
^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 245, in wrapper
return func(self, options, args)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 510, in run
self._handle_target_dir(
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 569, in _handle_target_dir
shutil.move(os.path.join(lib_dir, item), target_item_dir)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 869, in move
copytree(src, real_dst, copy_function=copy_function,
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 573, in copytree
return _copytree(entries=entries, src=src, dst=dst, symlinks=symlinks,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/shutil.py", line 471, in _copytree
os.makedirs(dst, exist_ok=dirs_exist_ok)
File "<frozen os>", line 225, in makedirs
PermissionError: [Errno 13] Permission denied: '/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/numpy-1.26.4.dist-info'
What feels really wrong is the fact that permission denied library is python 3.10, but I want to use 3.11. Also, when I open visual studio, it sees two interpreters, 3.9 and 3.11.
It is also good to note that I had some problems with different python versions, so I might made a mistake when deleting some of these.
I will appreciate any help, as I'm totally lost, but really wanted to try llama!
1st of all I heaviyl advise you to not use global installations for development, otherwise you might screq up your system.
I heavily advise that you create a small virtual environment, which creates a local environment and perform all installations in a local folder.
example: I am in the folder /storage/PyENV/lin and there I create a new environment:
when you look in that directory you have this structure:
Now you enter the environment and can easily make installations in this local folder.
There you can perform any installation with pip, like this sample installation called "django":
when you look in this folder:
/storage/PyENV/lin/TestENV/lib/python3.11/site-packages
then all the packages are installed in this "virtual env directory" and not global:
that ensures that your working environment is local and you don't run in this danger to mess up your system.
And more important, don't do it as an administrator, only as a user.
I hope it helped.