Bicky
Posts: 5
Joined: Wed Jul 10, 2019 5:24 am

Can't access package outside virtual environment from inside of virtual environment

Wed Jul 10, 2019 5:39 am

Some days ago i installed opencv in my raspberry pi in a virtual environment then some days later i installed tensor flow outside of the virtual environment.
Now i am stuck because tensor flow only works outside of the environment and open cv only inside virtual environment.What should i do?😭😭😭

User avatar
topguy
Posts: 5684
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Can't access package outside virtual environment from inside of virtual environment

Wed Jul 10, 2019 1:58 pm

Can't access package outside virtual environment from inside of virtual environment
I think this is basically the definition of a virtual environment...
tensor flow only works outside of the environment and open cv only inside virtual environment
What is the basis for using the work "only" ? Is there some special verison of OpenCV that cant be installed directly on Raspbian ?
Are there two wildly different versions of Python used ?

DirkS
Posts: 9902
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Can't access package outside virtual environment from inside of virtual environment

Wed Jul 10, 2019 2:50 pm

Which virtual environment software do you use?

I use virtualenv and it has the option to use globally installed modules.
Can't remember the exact option though.

I wouldn't be surprised if other packages offer the same functionality

Bicky
Posts: 5
Joined: Wed Jul 10, 2019 5:24 am

Re: Can't access package outside virtual environment from inside of virtual environment

Wed Jul 10, 2019 2:59 pm

Actually i mistakenly forgot to activate the virtual environment for tensor flow installation.
Do i have to do everything all over again in virtual environment ?
The tutorial i've been following is [/url] https://github.com/EdjeElectronics/Tens ... spberry-Pi [url]

blimpyway
Posts: 150
Joined: Mon Mar 19, 2018 1:18 pm

Re: Can't access package outside virtual environment from inside of virtual environment

Thu Jul 11, 2019 2:35 am

yes you activate your target environment and run again

Code: Select all

sudo pip3 install /home/pi/tf/tensorflow-1.8.0-cp35-none-linux_armv7l.whl
and whatever other pip install packages are mentioned

Return to “Python”