create account

RE: [Python Tips] Virtual Environments by themarkymark

View this thread on: hive.blogpeakd.comecency.com

Viewing a response to: @netscape101/re-themarkymark-re-netscape101-re-themarkymark-re-netscape101-re-themarkymark-re-netscape101-re-themarkymark-python-tips-virtual-environments-20180523t191617571z

· @themarkymark · (edited)
I haven't used it in a virtualenv environment, but I believe it will read in a .env file.  I would recommend removing the virtual env all together, and reinstalling the packages using `pipenv install ...` and it will handle it all.

Just make sure you are in the project folder.

`pipenv` makes it really easy to uninstall/install modules and will handle adding only modules you need.
👍  
properties (23)
authorthemarkymark
permlinkre-netscape101-re-themarkymark-re-netscape101-re-themarkymark-re-netscape101-re-themarkymark-re-netscape101-re-themarkymark-python-tips-virtual-environments-20180523t195747212z
categoryprogramming
json_metadata{"tags":["programming"],"app":"steemit/0.1"}
created2018-05-23 19:56:48
last_update2018-05-23 19:57:21
depth8
children2
last_payout2018-05-30 19:56:48
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length384
author_reputation1,777,493,375,863,925
root_title"[Python Tips] Virtual Environments"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id57,325,616
net_rshares1,056,440,405
author_curate_reward""
vote details (1)
@netscape101 ·
Cool thanks you are right. I see in the documentation here: https://docs.pipenv.org/basics/#importing-from-requirements-txt  it says: "If you only have a requirements.txt file available when running pipenv install, pipenv will automatically import the contents of this file and create a Pipfile for you." and it says: "You can also specify $ pipenv install -r path/to/requirements.txt to import a requirements file." and that pretty means you can also install from a file that isn't named requirements.txt also for example: ```pipenv install -r dev-requirements.txt``` Thanks for sharing all the info. Would you mind if I add you on discord?
properties (22)
authornetscape101
permlinkre-themarkymark-re-netscape101-re-themarkymark-re-netscape101-re-themarkymark-re-netscape101-re-themarkymark-re-netscape101-re-themarkymark-python-tips-virtual-environments-20180524t085942595z
categoryprogramming
json_metadata{"tags":["programming"],"links":["https://docs.pipenv.org/basics/#importing-from-requirements-txt"],"app":"steemit/0.1"}
created2018-05-24 08:59:42
last_update2018-05-24 08:59:42
depth9
children1
last_payout2018-05-31 08:59:42
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length641
author_reputation45,783,947,118
root_title"[Python Tips] Virtual Environments"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id57,422,255
net_rshares0
@netscape101 ·
$0.15
I ran into this isssue when I ran: ```$pipenv install -r requirements.txt```: "Unkown locale: UTF-8" and I solved it with this: 
https://stackoverflow.com/questions/38916461/valueerror-unknown-locale-utf-8-when-importing-pandas-in-python-2-7 
I added this to ~/.bash_profile:
```
export=LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
```
and did:
``` 
$ source ~/.bash_profile
```
and then this worked: 
```
$ pipenv install -r requirements.txt
```
👍  
properties (23)
authornetscape101
permlinkre-netscape101-re-themarkymark-re-netscape101-re-themarkymark-re-netscape101-re-themarkymark-re-netscape101-re-themarkymark-re-netscape101-re-themarkymark-python-tips-virtual-environments-20180524t092521415z
categoryprogramming
json_metadata{"tags":["programming"],"links":["https://stackoverflow.com/questions/38916461/valueerror-unknown-locale-utf-8-when-importing-pandas-in-python-2-7"],"app":"steemit/0.1"}
created2018-05-24 09:25:21
last_update2018-05-24 09:25:21
depth10
children0
last_payout2018-05-31 09:25:21
cashout_time1969-12-31 23:59:59
total_payout_value0.116 HBD
curator_payout_value0.037 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length444
author_reputation45,783,947,118
root_title"[Python Tips] Virtual Environments"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id57,425,377
net_rshares41,102,102,658
author_curate_reward""
vote details (1)