简体   繁体   中英

Issue installing Python PIP package manually from Windows Store installation

I'm running Python via the Windows Store installation and when I go to manually install a package, I get a long-winded message about using 'easy_install'. My version is Python 3.9. What's the best way to move forward?

python setup.py install

running install 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.9_3.9.2544.0_x64__qbz5n2kfra8p0\\Lib\\site-packages\\test-easy-install-7300.write-test'

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

 C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.2544.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.readthedocs.io/en/latest/deprecated/easy_install.html

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

Step 1: Download PIP get-pip.py Before installing PIP, download the get-pip.py file. https://bootstrap.pypa.io/get-pip.py

  1. Launch a command prompt if it isn't already open. To do so, open the Windows search bar, type cmd and click on the icon.

  2. Then, run the following command to download the get-pip.py file:

curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py Download PIP software package. Step 2: Installing PIP on Windows To install PIP type in the following:

python get-pip.py Install PIP on Windows. If the file isn't found, double-check the path to the folder where you saved the file. You can view the contents of your current directory using the following command:

dir The dir command returns a full listing of the contents of a directory.

Step 3: Verify Installation Once you've installed PIP, you can test whether the installation has been successful by typing the following:

pip help If PIP has been installed, the program runs, and you should see the location of the software package and a list of commands you can use with pip.

Run pip help command to verify installation. If you receive an error, repeat the installation process.

Step 4: Add Pip to Windows Environment Variables To run PIP from any location, you need to add it to Windows environment variables to avoid getting the "not on PATH" error. To do so, follow the steps outlined below:

Open the System and Security window by searching for it in the Control Plane. Navigate to System settings. Navigate to System settings in Windows. Then, select Advanced system settings.

Open the Environment Variables and double-click on the Path variable in the System Variables.

Next, select New and add the directory where you installed PIP. Click OK to save the changes. Step 5: Configuration In Windows, the PIP configuration file is %HOME%\pip\pip.ini.

There is also a legacy per-user configuration file. The file is located at %APPDATA%\pip\pip.ini.

You can set a custom path location for this config file using the environment variable PIP_CONFIG_FILE.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM