pipdeptree
pipdeptree copied to clipboard
Version 2.2.1 on Windows installs into wrong directory, causing `file not found` errors
I did python -m pip install --upgrade pipdeptree
to install the package on a Windows 7 machine and it was installed into C:\Program Files\Python38\Lib\site-packages\pipdeptree-2.2.1.dist-info\pipdeptree-2.2.1.dist-info
instead of just C:\Program Files\Python38\Lib\site-packages\pipdeptree-2.2.1.dist-info
, causing file not found
errors when trying to run it.
@kerstin921 Like any other python package, pipdeptree cannot control how/where it gets installed on a particular environment. It could be related to the behaviour of pip on Windows 7. I am not quite familiar with windows but 2 things come to mind for such problems: (1) admin privileges (2) sys.path
You may also try specifying the -t
option when running pip install
.
Hi,
I already checked privileges and path variables, they're all perfectly set as I recently did a clean, system-wide reinstall of the entire Python framework. Can you at least reproduce this behavior and confirm/refute this is not a bug on your side?
Unfortunately I can't reproduce the issue completely as I don't have access to a windows 7 machine. I can try to reproduce it inside a virtualenv on linux.
Can you provide following info?
- Version of python and pip
- Previous version of pipdeptree that you upgraded from.
At your end, can you also please try upgrading some other package to confirm that it's not your environment?
I can even give you complete list of packages on that machine:
C:\Users\Username>python -m pip list
Package Version
-------------------- -----------
anyio 3.6.1
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asttokens 2.0.5
async-generator 1.10
atomicwrites 1.4.1
attrs 21.4.0
backcall 0.2.0
beautifulsoup4 4.11.1
bleach 5.0.1
certifi 2022.6.15
cffi 1.15.1
chardet 5.0.0
charset-normalizer 2.1.0
colorama 0.4.5
cycler 0.11.0
Cython 0.29.30
DateTime 4.5
debugpy 1.6.2
decorator 5.1.1
defusedxml 0.7.1
entrypoints 0.4
executing 0.8.3
fastjsonschema 2.16.1
fdtd 0.2.5
fonttools 4.34.4
future 0.18.2
gprMax 3.1.4
graphviz 0.20
h5py 3.7.0
icc-rt 2019.0
idna 3.3
importlib-resources 5.9.0
iniconfig 1.1.1
intel-openmp 2022.1.0
ipykernel 6.15.1
ipython 8.4.0
ipython-genutils 0.2.0
ipywidgets 7.7.1
jedi 0.18.1
Jinja2 3.1.2
jsonschema 4.7.2
jupyter 1.0.0
jupyter-client 7.3.4
jupyter-console 6.4.4
jupyter-core 4.11.1
jupyter-server 1.18.1
jupyter-telemetry 0.1.0
jupyterlab-pygments 0.2.2
jupyterlab-widgets 1.1.1
kiwisolver 1.4.4
littleutils 0.2.2
llvmlite 0.38.1
MarkupSafe 2.1.1
matplotlib 3.5.2
matplotlib-inline 0.1.3
mistune 0.8.4
nbclassic 0.4.3
nbclient 0.6.6
nbconvert 6.5.0
nbformat 5.4.0
nest-asyncio 1.5.5
notebook 6.4.12
notebook-shim 0.1.0
numba 0.55.2
numpy 1.22.4
nvidia-ml-py3 7.352.0
nvidia-smi 0.1.3
oauthlib 3.2.0
packaging 21.3
pandas 1.4.3
pandocfilters 1.5.0
parso 0.8.3
pickleshare 0.7.5
Pillow 9.2.0
pip 22.2
pipdeptree 2.2.1
pluggy 1.0.0
prometheus-client 0.14.1
prompt-toolkit 3.0.30
psutil 5.9.1
pure-eval 0.2.2
py 1.11.0
py-thorlabs-tsp 0.0.8
pycparser 2.21
Pygments 2.12.0
pyparsing 3.0.9
pyrsistent 0.18.1
pytest 7.1.2
python-dateutil 2.8.2
python-json-logger 2.0.4
pytz 2022.1
pywin32 304
pywinpty 2.0.6
pyzmq 23.2.0
qtconsole 5.3.1
QtPy 2.1.0
requests 2.28.1
ruamel.yaml 0.17.21
ruamel.yaml.clib 0.2.6
scipy 1.8.1
seaborn 0.11.2
Send2Trash 1.8.0
setuptools 63.2.0
six 1.16.0
sniffio 1.2.0
sorcery 0.2.2
soupsieve 2.3.2.post1
stack-data 0.3.0
stdlib-list 0.8.0
terminado 0.15.0
terminaltables 3.1.10
tinycss2 1.1.1
tomli 2.0.1
torch 1.12.0
tornado 6.2
tqdm 4.64.0
traitlets 5.3.0
typing_extensions 4.3.0
urllib3 1.26.10
wcwidth 0.2.5
webencodings 0.5.1
websocket-client 1.3.3
wheel 0.37.1
widgetsnbextension 3.6.1
wrapt 1.14.1
zipp 3.8.1
zmq 0.0.0
zope.interface 5.4.0
This is a complete, clean install of Python and all packages via pip install --upgrade
, so unless explicitly downgraded by me, everything should be the latest version. Also, Python 3.8.10 is the latest version with Windows 7 support and should also be fine for everything else (some people are still working with much older versions).
PS.: So, to answer your question, pipdeptree
hasn't been upgraded from an older version either
Thanks for sharing the info. I tried reproducing this behaviour on linux with python version 3.8.0 and pip version 22.1.2, but couldn't. I tried both, installing the latest version with the --upgrade
flag as well as actually upgrading from an older version of pipdeptree. In both cases, the files were copied to the expected location.
I can see pipdeptree
in the pip list
output, which indicates that pip is able to find the package in spite of the incorrect location. Can you share the complete error output of pipdeptree
.
Also, pipdeptree
doesn't depend on any other external packages, so it's unlikely that the version of any other package installed in your env could impact it.
Seems this was fixed, and was a broken installation.