0

I am running the following command:

python setup.py install

However, I get this error message:

C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2288.0_x64__qbz5n2kfra8p0\Lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
  warnings.warn(
WARNING: The wheel package is not available.
WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
running install
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2288.0_x64__qbz5n2kfra8p0\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2288.0_x64__qbz5n2kfra8p0\Lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [Errno 13] Permission denied: 'C:\\Program Files\\WindowsApps\\PythonSoftwareFoundation.Python.3.11_3.11.2288.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\test-easy-install-4508.write-test'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.2288.0_x64__qbz5n2kfra8p0\Lib\site-packages\

Perhaps your account does not have write access to this directory?  If the
installation directory is a system-owned directory, you may need to sign in
as the administrator or "root" account.  If you do not have administrative
access to this machine, you may wish to choose a different installation
directory, preferably one that is listed in your PYTHONPATH environment
variable.

For information on other options, you may wish to consult the
documentation at:

  https://setuptools.pypa.io/en/latest/deprecated/easy_install.html

Please make the appropriate changes for your system and try again.

I am the administrator on the computer and have tested this on 2 computers, but nothing seems to be working.

1
  • You're the admin, but did you run the cmd/powershell itself as administrator? Commented Apr 4, 2024 at 20:16

2 Answers 2

0

Try changing the install directory, since it might be that, even though you are an admin, windows doesn't want it to be put in that directory due to it causing issues with windows files. Try searching IDLE in taskbar too, since IDLE is a python directory(I think it is automatically installed.) If none of this works, go to https://www.python.org/downloads/ and then install the most recent version of python for your version of windows, and then search idle, and python should work.

Sign up to request clarification or add additional context in comments.

4 Comments

I see IDLE but what do I do with it? How do I change the install directory because right now I am getting this error whn I try to: error: option --install-dir not recognized
where are you running the install code?
also could you open up idle and tell me if it is working? Since Idle is python
Try installing Visual-Studio Code for python, run a few basic commands to check if it is working - it might be that python has already set itself up on your pc
0

Try this -

python setup.py install --install-dir=path\to\desired\directory

It's generally recommended to use Virtual Environments when installing Python packages, as it avoids conflicts and permission issues with system-wide Python installations. Create a virtual environment using python -m venv myenv, activate it (myenv\Scripts\activate on Windows), and then try installing your package again.

2 Comments

When I try the code you give, I get this: error: option --install-dir not recognized I have created a virtual environment but how do I activate this? I see the activate file but what do I do with it?
@Jonathan to activate your env, do this- in terminal go to the directory you created your environment folder and then type yourEnvFolder/Scripts/activate and press enter in the terminal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.