question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Issue with creating VENV

See original GitHub issue
  • I’m submitting a …

    • bug report
    • feature request
    • [X ] support request
  • What is the current behavior? Hi Pierre, In the installation process via command line (only way to install on Linux afaik), the following step is not working for me.

xkra@computer:~/node-launcher$ python3.7 -m venv venv
The virtual environment was not created successfully because ensurepip is not
available.  On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

    apt-get install python3-venv

You may need to use sudo with that command.  After installing the python3-venv
package, recreate your virtual environment.

Failing command: ['/home/xkra/node-launcher/venv/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']

I have installed python3-venv, see as follows:

xkra@computer:~/node-launcher$ sudo apt-get install python3-venv
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python3-venv is already the newest version (3.6.7-1~18.04).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.

I also did the following: sudo apt-get install python-pip I am a command line n00b and have not much experience in how to fix this - would greatly appreciate if you could help me out.

  • If the current behavior is a bug, please provide the steps to reproduce N/A

  • What is the expected behavior? Not sure 😃

  • What is the motivation / use case for changing the behavior? Get your Node Launcher running!

  • Please tell us about your environment:

    • Operating System: [ Ubuntu 18.04.2 LTS]

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
Sosthene00commented, Apr 29, 2019

Hi @xkra, I just tried it on a Ubuntu 18.04, first installed python3.7.1 with sudo apt install python3.7, nothing special, but then I got tricked too by the error message that asked me to install python3-venv, because it is in fact already installed. I installed python3.7-venv instead, and after that python3.7 -m venv venv works as intended. To sum it up, sudo apt install python3.7-venv should solve your issue. [EDIT] it seems that creating a venv with the --without pip flag doesn’t allow you to install new packages, that’s why you got those error messages.

0reactions
PierreRochardcommented, Apr 29, 2019

Thank you @BobleChinois ! I’ve added that line to the readme

Read more comments on GitHub >

github_iconTop Results From Across the Web

venv — Creation of virtual environments — Python 3.11.1 ...
A virtual environment is created on top of an existing Python installation, known as the virtual environment's “base” Python, and may optionally be...
Read more >
Python venv not creating virtual environment - Stack Overflow
Sometime system's path environment is not aware of virtualenv.exe. solution: install virtualenv pip install virtualenv.
Read more >
Creating a 'venv' virtual environment fails when it is unable to ...
I tested the fix on 32-bit anaconda 3, using the command conda update -c c3i_test2 python . The fix worked well for me....
Read more >
Python virtualenv and venv dos and don'ts - InfoWorld
Python virtual environments shine for keeping projects and conflicting packages separate. Just keep these dos and don'ts in mind.
Read more >
Configure a virtual environment | PyCharm Documentation
PyCharm makes it possible to use the virtualenv tool to create a project-specific isolated virtual environment. The main purpose of virtual environments is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found