-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pipx does not copy site-packages in venvs when installing, resulting in error "No module named pip" #888
Comments
@meowmeowmeowcat, does this fix solve this? (it did for me, albeit on MacOS)
|
@Klemet Could you try to remove |
🤦 sorry, pinged the wrong person |
I had the same issue after upgrading to Fedora 37 (which updated the main Python installation from 3.10 to 3.11.0rc2). Removing |
@meowmeowmeowcat , sorry for being late to respond ! Removing PS C:\Windows\System32> pipx install pycowsay
Fatal error from pip prevented installation. Full pip output in file:
C:\Users\Klemet\.local\pipx\logs\cmd_2022-10-04_13.42.35_pip_errors.log
Error installing pycowsay.
PS C:\Windows\System32> Remove-Item "C:\Users\Klemet\.local\pipx\shared"
Confirm
The item at C:\Users\Klemet\.local\pipx\shared has children and the Recurse parameter was not specified. If you
continue, all children will be removed with the item. Are you sure you want to continue?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): Y
PS C:\Windows\System32> pipx install pycowsay
Fatal error from pip prevented installation. Full pip output in file:
C:\Users\Klemet\.local\pipx\logs\cmd_2022-10-04_13.44.35_pip_errors.log
Error installing pycowsay.
PS C:\Windows\System32> The resulting pip logs still contain the same error. |
You are the best. Thank you so much. |
I experienced this problem on Arch Linux as well (mentioning because the issue is only tagged Windows) |
Actually I just experienced it on macOS as well. 😄 @Klemet Could you try to remove |
Well, I wanted to delete But now, everything seems to work ! I did not even delete Sorry if that makes it more difficult to find out what the problem was. I'm very surprised. |
|
Describe the bug
When trying to install any package with
pipx
, apip
error is thrown and a log created. The error isNo module named pip
.By digging and little and reproducing the commands that
pipx
uses (present in the log), I realized that during the installation,pipx
correctly created thevenvs
folder for the package that it was trying to install; however, theLib/site-packages
of thevenvs
folder is empty.Therefore, as the folder does not contain the
pip
package files, the installation throws an error when trying to use the commandC:\Users\<USER NAME>\.local\pipx\venvs\pycowsay\Scripts\python.exe -m pip install <PACKAGE NAME>
.How to reproduce
pipx
is installed with Python and not Anaconda, and correctly points to the Python installation)pipx install <PACKAGE NAME>
Expected behavior
The installation process should properly copy the necessary files in
venvs/<PACKAGE NAME>/Lib/site-packages
, making the commandC:\Users\<USER NAME>\.local\pipx\venvs\pycowsay\Scripts\python.exe -m pip install <PACKAGE NAME>
succeed and the installation completed.Workaround
It is possible to create the folder
venvs/<PACKAGE NAME>/Lib/site-packages
in advance of using the commandpipx install <PACKAGE NAME>
, and to fill it with the files and folders present inC:\Users\<USER NAME>\.local\pipx\shared\Lib\site-packages
.If this is done, using the command
pipx install <PACKAGE NAME> --force
will complete the installation of the package properly.Potential causes
pipx
files, but who knows ?pipx
from copying the files properly ? Butpipx
is still able to create some folders and copy some files when attempting the installation; it's just the files invenvs/<PACKAGE NAME>/Lib/site-packages
that are missing.The text was updated successfully, but these errors were encountered: