I am trying to install packages with pip from a local index that I have created with pip2pi. But I am in no way able to install these packages to a virtual environment. Basically I just followed the steps of the pip2pi documentation or the third answer in this stackoverflow post.
I started out downloading the required packages from pip to a local directory:
#download package
pip2tgz /d/temp/packages pyyaml==3.11
#create index
dir2pi /d/temp/packages
Afterwards I created a new virtual environment for python and tried installing the package
#Create environment
virtualenv /d/temp/myenv
#Activate environment
source /d/temp/myenv/Scripts/activate
#Install pyyaml
pip install --index-url=file:///d/temp/packages/simple pyyaml==3.11
Installing pyyaml (or any other package for that matter) always fails:
Collecting pyyaml==3.11
←[33m DEPRECATION: Failed to find 'pyyaml' at file:///d/temp/packages/simple/pyyaml/.
It is suggested to upgrade your index to support normalized names as the
name in /simple/{name}.←[0m
←[31m Cannot fetch index base URL file:///d/temp/packages/simple/←[0m
←[31m Could not find a version that satisfies the requirement pyyaml==3.11 (from versions: )←[0m
←[31mNo matching distribution found for pyyaml==3.11←[0m
(myenv)
I am just trying to install the same version that I downloaded. I also tried using different flags like passing --normalize-package-names
to dir2pi
or calling pip install
with arguments --no-index
and --find-links /d/temp/packages/
.
Note: I am working on a Windows machine, from within gitbash.
Pip
and pip2pi
are updated to the newest version (7.1.0 and 0.6.8)