new created pipenv environment is not empty

986 views Asked by At

I created a new env with pipenv shell however doing pip freeze (yes inside the environment) does return many installed packages.

I tried pipenv clean and pipenv uninstall --all but same result. The packages (rekated to ROS apparently) but how can I create a new environment without them. Some of the packages:

    rqt-robot-dashboard==0.5.7
    rqt-robot-monitor==0.5.13
    rqt-robot-steering==0.5.10
    rqt-runtime-monitor==0.5.7
    rqt-rviz==0.6.0
    rqt-service-caller==0.4.8
    rqt-shell==0.4.9
    rqt-srv==0.4.8
    rqt-tf-tree==0.6.0
    rqt-top==0.4.8
    rqt-topic==0.4.11
    rqt-web==0.4.8
    rviz==1.13.13
    sensor-msgs==1.12.7
    smach==2.0.1
    smach-ros==2.0.1
    smclib==1.8.5
    tf==1.12.1
    tf-conversions==1.12.1
    rosbag==1.14.9
    rosboost-cfg==1.14.9
    rosclean==1.14.9
    roscreate==1.14.9
    rosgraph==1.14.9
    roslaunch==1.14.9
    roslib==1.14.9
    roslint==0.11.2
    roslz4==1.14.9

To Summarize: Doing pip freeze in the global environment shows all packages ROS + others. Doing pip freeze in the created environment, does not show the "other" packages only the ROS one.How can I create an empty one?

1

There are 1 answers

4
Paddy Alton On

I have a bunch of packages installed on my system, but I don't experience the same problem. I think this is because I typically create a Pipfile before doing pipenv install.

To test this, I made an empty Pipfile like this:

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[dev-packages]

[scripts]

[requires]
python_version="3"

[packages]


I then did pipenv install, then pipenv run pip freeze. This gave no output. I then added one package manually to the Pipfile, did the same again, and this time got the expected output.

This may be replicable by you as follows:

  • delete the virtual environment you already created
  • make the blank Pipfile in your project as outlined
  • do pipenv install
  • do pipenv run pip freeze

(if it doesn't work, maybe add some details about your OS, pipenv version etc.)